[server/test] avoid lgdb warnings from str to unicode conversion
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 02 Jul 2015 09:25:45 +0200
changeset 10508 2a578b9e7ad8
parent 10507 d54a942ee6da
child 10509 e8ac062d4b20
[server/test] avoid lgdb warnings from str to unicode conversion
server/test/unittest_querier.py
--- a/server/test/unittest_querier.py	Fri Jul 03 15:18:24 2015 +0200
+++ b/server/test/unittest_querier.py	Thu Jul 02 09:25:45 2015 +0200
@@ -1507,9 +1507,9 @@
     def test_nonregr_has_text_cache(self):
         eid1 = self.qexecute("INSERT Personne X: X nom 'bidule'")[0][0]
         eid2 = self.qexecute("INSERT Personne X: X nom 'tag'")[0][0]
-        rset = self.qexecute("Any X WHERE X has_text %(text)s", {'text': 'bidule'})
+        rset = self.qexecute("Any X WHERE X has_text %(text)s", {'text': u'bidule'})
         self.assertEqual(rset.rows, [[eid1]])
-        rset = self.qexecute("Any X WHERE X has_text %(text)s", {'text': 'tag'})
+        rset = self.qexecute("Any X WHERE X has_text %(text)s", {'text': u'tag'})
         self.assertEqual(rset.rows, [[eid2]])
 
     def test_nonregr_sortterm_management(self):
@@ -1620,9 +1620,9 @@
             aff2 = cnx.create_entity('Societe', nom=u'aff2')
             cnx.commit()
         with self.new_access('user').repo_cnx() as cnx:
-            res = cnx.execute('Any X WHERE X has_text %(text)s', {'text': 'aff1'})
+            res = cnx.execute('Any X WHERE X has_text %(text)s', {'text': u'aff1'})
             self.assertEqual(res.rows, [[aff1.eid]])
-            res = cnx.execute('Any X WHERE X has_text %(text)s', {'text': 'aff2'})
+            res = cnx.execute('Any X WHERE X has_text %(text)s', {'text': u'aff2'})
             self.assertEqual(res.rows, [[aff2.eid]])
 
     def test_set_relations_eid(self):