-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes unicode error in Python 2 #508
Fixes unicode error in Python 2 #508
Conversation
@amercader I haven't found any workable solution to create a test for BTW: The tests for CKAN 2.10 are broken on the master as well. So I think it has nothing to do with the changes in the pull request. |
@seitenbau-govdata this should do the trick: diff --git a/ckanext/harvest/tests/test_blueprint.py b/ckanext/harvest/tests/test_blueprint.py
index dbbca7d..a6bef99 100644
--- a/ckanext/harvest/tests/test_blueprint.py
+++ b/ckanext/harvest/tests/test_blueprint.py
@@ -1,3 +1,4 @@
+# coding: utf-8
import six
import pytest
@@ -126,3 +127,15 @@ class TestBlueprint():
response = app.get(url, extra_environ=env)
_assert_in_body(job['id'], response)
+
+ def test_search_dataset_special_characters(self, app):
+
+ value = u"abcčd"
+
+ dataset = factories.Dataset(tags=[{"name": value}])
+
+ url = u"/dataset?tags=" + value
+
+ response = app.get(url)
+
+ _assert_in_body(dataset["title"], response)
Note I didn't use The 2.10 failures should be fixed now |
@amercader I have tried the quite similar test.
But it hasn't worked with CKAN < 2.9 because of a unicode error in And I was getting into the rabbit whole with using |
a189e63
to
ad4472b
Compare
@amercader This is the unicode error in the test I got for CKAN < 2.9. It looks like the test app cannot handle the unicode value for the parameter when calling |
Let's remove the test then and not waste more time, the change is straightforward enough |
ad4472b
to
a38d5e9
Compare
@amercader I have removed the test now. |
…de-support-py2 Fixes unicode error in Python 2
Fixes #502