[test] use unicode for rql queries (4/7)
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 08 Sep 2015 16:25:16 +0200
changeset 10657 92c96bf05528
parent 10656 0b1d03f07b87
child 10658 e73ce169762b
[test] use unicode for rql queries (4/7) Related to #6694446
web/test/unittest_magicsearch.py
--- a/web/test/unittest_magicsearch.py	Tue Sep 08 16:24:57 2015 +0200
+++ b/web/test/unittest_magicsearch.py	Tue Sep 08 16:25:16 2015 +0200
@@ -64,19 +64,19 @@
     def test_basic_translations(self):
         """tests basic translations (no ambiguities)"""
         with self.proc() as proc:
-            rql = "Any C WHERE C is Adresse, P adel C, C adresse 'Logilab'"
+            rql = u"Any C WHERE C is Adresse, P adel C, C adresse 'Logilab'"
             rql, = proc.preprocess_query(rql)
-            self.assertEqual(rql, "Any C WHERE C is EmailAddress, P use_email C, C address 'Logilab'")
+            self.assertEqual(rql, 'Any C WHERE C is EmailAddress, P use_email C, C address "Logilab"')
 
     def test_ambiguous_translations(self):
         """tests possibly ambiguous translations"""
         with self.proc() as proc:
-            rql = "Any P WHERE P adel C, C is EmailAddress, C nom 'Logilab'"
+            rql = u"Any P WHERE P adel C, C is EmailAddress, C nom 'Logilab'"
             rql, = proc.preprocess_query(rql)
-            self.assertEqual(rql, "Any P WHERE P use_email C, C is EmailAddress, C alias 'Logilab'")
-            rql = "Any P WHERE P is Utilisateur, P adel C, P nom 'Smith'"
+            self.assertEqual(rql, 'Any P WHERE P use_email C, C is EmailAddress, C alias "Logilab"')
+            rql = u"Any P WHERE P is Utilisateur, P adel C, P nom 'Smith'"
             rql, = proc.preprocess_query(rql)
-            self.assertEqual(rql, "Any P WHERE P is CWUser, P use_email C, P surname 'Smith'")
+            self.assertEqual(rql, 'Any P WHERE P is CWUser, P use_email C, P surname "Smith"')
 
 
 class QSPreProcessorTC(CubicWebTC):