[web/test] replace unicode with six.text_type
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 14 Mar 2016 21:28:44 +0100
changeset 11183 505195fe444d
parent 11182 66c44d3d97af
child 11184 2a7b98d91736
[web/test] replace unicode with six.text_type Some uses of unicode reappeared when merging changes from 3.19.14.
cubicweb/web/test/unittest_application.py
--- a/cubicweb/web/test/unittest_application.py	Thu Feb 18 10:23:05 2016 +0100
+++ b/cubicweb/web/test/unittest_application.py	Mon Mar 14 21:28:44 2016 +0100
@@ -254,8 +254,8 @@
         parent_eid = parent_eid or '__cubicweb_internal_field__'
         with self.admin_access.web_request() as req:
             req.form = {
-                'eid': unicode(dir_eid),
-                '__maineid': unicode(dir_eid),
+                'eid': text_type(dir_eid),
+                '__maineid': text_type(dir_eid),
                 '__type:%s' % dir_eid: etype,
                 'parent-%s:%s' % (role, dir_eid): parent_eid,
             }
@@ -271,8 +271,8 @@
         version_eid = version_eid or '__cubicweb_internal_field__'
         with self.admin_access.web_request() as req:
             req.form = {
-                'eid': unicode(ticket_eid),
-                '__maineid': unicode(ticket_eid),
+                'eid': text_type(ticket_eid),
+                '__maineid': text_type(ticket_eid),
                 '__type:%s' % ticket_eid: 'Ticket',
                 'in_version-subject:%s' % ticket_eid: version_eid,
             }
@@ -313,8 +313,8 @@
 
         with self.admin_access.web_request() as req:
             req.form = {
-                'eid': (unicode(topd.eid), u'B'),
-                '__maineid': unicode(topd.eid),
+                'eid': (text_type(topd.eid), u'B'),
+                '__maineid': text_type(topd.eid),
                 '__type:%s' % topd.eid: 'Directory',
                 '__type:B': 'Directory',
                 'parent-object:%s' % topd.eid: u'B',
@@ -487,8 +487,8 @@
             cnx.commit()
 
         with self.admin_access.web_request() as req:
-            dir_eid = unicode(mydir.eid)
-            perm_eid = unicode(perm.eid)
+            dir_eid = text_type(mydir.eid)
+            perm_eid = text_type(perm.eid)
             req.form = {
                 'eid': [dir_eid, perm_eid],
                 '__maineid' : dir_eid,