Commit fdf39722 by Tim Babych Committed by Oleg Marshev

add test for unicode search

parent 48787f16
......@@ -331,17 +331,17 @@ class AnnotationViewTests(BaseAnnotationViewTests):
self.assertEqual(results['rows'][1]['text'], 'Second note')
self.assertEqual(results['rows'][2]['text'], 'First one')
# def test_search_unicode(self):
# """
# Tests searching of unicode strings.
# """
# self._create_annotation(text=u'Веселих свят')
def test_search_unicode(self):
"""
Tests searching of unicode strings.
"""
self._create_annotation(text=u'Веселих свят')
# results = self._get_search_results(text=u"веселих".encode('utf-8'))
# self.assertEqual(results['total'], 1)
results = self._get_search_results(text=u"веселих")
self.assertEqual(results['total'], 1)
# results = self._get_search_results(text=u"свят")
# self.assertEqual(results['total'], 1)
results = self._get_search_results(text=u"свят")
self.assertEqual(results['total'], 1)
def test_read_all_no_annotations(self):
"""
......
Django==1.7.1
requests==2.4.3
djangorestframework==2.4.4
djangorestframework==3.0.2
django-rest-swagger==0.2.0
elasticutils==0.10
elasticsearch==1.2.0
......
-r base.txt
# unicode QUERY_PARAMS are being improperly decoded in test client
# remove after https://github.com/tomchristie/django-rest-framework/issues/1891 is fixed
-e git+https://github.com/tymofij/django-rest-framework.git@bugfix/test-unicode-query-params#egg=djangorestframework
django_nose==1.2
mock==1.0.1
coverage==3.7.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment