[py3k] CubicWebTC.app_handle_request returns bytes
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 22 Sep 2015 15:42:40 +0200
changeset 10735 cb83ba66fa61
parent 10734 e64738c093e5
child 10736 8d49849ec2a6
[py3k] CubicWebTC.app_handle_request returns bytes
web/test/unittest_application.py
--- a/web/test/unittest_application.py	Tue Sep 22 15:37:31 2015 +0200
+++ b/web/test/unittest_application.py	Tue Sep 22 15:42:40 2015 +0200
@@ -276,8 +276,8 @@
     def _test_cleaned(self, kwargs, injected, cleaned):
         with self.admin_access.web_request(**kwargs) as req:
             page = self.app_handle_request(req, 'view')
-            self.assertNotIn(injected, page)
-            self.assertIn(cleaned, page)
+            self.assertNotIn(injected.encode('ascii'), page)
+            self.assertIn(cleaned.encode('ascii'), page)
 
     def test_nonregr_script_kiddies(self):
         """test against current script injection"""