[test] use unicode for rql queries (6/7)
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 08 Sep 2015 16:28:55 +0200
changeset 10659 5b670cb3ae00
parent 10658 e73ce169762b
child 10660 97f6b3d655fc
[test] use unicode for rql queries (6/7) Related to #6694446
web/test/unittest_views_json.py
--- a/web/test/unittest_views_json.py	Tue Sep 08 16:25:26 2015 +0200
+++ b/web/test/unittest_views_json.py	Tue Sep 08 16:28:55 2015 +0200
@@ -36,7 +36,7 @@
 
     def test_json_rsetexport_empty_rset(self):
         with self.admin_access.web_request() as req:
-            rset = req.execute('Any X WHERE X is CWUser, X login "foobarbaz"')
+            rset = req.execute(u'Any X WHERE X is CWUser, X login "foobarbaz"')
             data = self.view('jsonexport', rset, req=req)
             self.assertEqual(req.headers_out.getRawHeaders('content-type'), ['application/json'])
             self.assertListEqual(data, [])
@@ -71,7 +71,7 @@
             self.assertEqual(data[0]['name'], 'guests')
             self.assertEqual(data[1]['name'], 'managers')
 
-            rset = req.execute('Any G WHERE G is CWGroup, G name "foo"')
+            rset = req.execute(u'Any G WHERE G is CWGroup, G name "foo"')
             data = self.view('ejsonexport', rset, req=req)
             self.assertEqual(req.headers_out.getRawHeaders('content-type'), ['application/json'])
             self.assertEqual(data, [])