[web/test] str → bytes
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 01 Oct 2015 11:50:09 +0200
changeset 10749 2703116e4b21
parent 10748 a704babdc840
child 10750 1166a47dad40
[web/test] str → bytes
web/test/unittest_views_basecontrollers.py
--- a/web/test/unittest_views_basecontrollers.py	Thu Oct 01 11:43:33 2015 +0200
+++ b/web/test/unittest_views_basecontrollers.py	Thu Oct 01 11:50:09 2015 +0200
@@ -779,7 +779,7 @@
             rset = self.john.as_rset()
             rset.req = req
             source = ctrl.publish()
-            self.assertTrue(source.startswith('<div>'))
+            self.assertTrue(source.startswith(b'<div>'))
 
 #     def test_json_exec(self):
 #         rql = 'Any T,N WHERE T is Tag, T name N'
@@ -820,7 +820,7 @@
                 rset.req = req
                 source = ctrl.publish()
                 # maydel jscall
-                self.assertIn('ajaxBoxRemoveLinkedEntity', source)
+                self.assertIn(b'ajaxBoxRemoveLinkedEntity', source)
 
     def test_pending_insertion(self):
         with self.remote_calling('add_pending_inserts', [['12', 'tags', '13']]) as (_, req):