[web/test] json.loads expects text, not bytes
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 08 Feb 2016 15:28:14 +0100
changeset 11155 3bc47295c262
parent 11154 221febada1e8
child 11156 36252a0c76ec
[web/test] json.loads expects text, not bytes
cubicweb/web/test/unittest_web.py
--- a/cubicweb/web/test/unittest_web.py	Mon Feb 08 16:39:51 2016 +0100
+++ b/cubicweb/web/test/unittest_web.py	Mon Feb 08 15:28:14 2016 +0100
@@ -82,7 +82,7 @@
         expect = {'fname': u'fileupload',
                   'file': ['schema.py', self._fcontent('schema.py')]}
         self.assertEqual(webreq.status_code, 200)
-        self.assertDictEqual(expect, loads(webreq.content))
+        self.assertDictEqual(expect, loads(webreq.text))
 
     def test_multiple_file_upload(self):
         files = [('files', ('schema.py', self._fobject('schema.py'))),
@@ -92,7 +92,7 @@
                   'files': [['schema.py', self._fcontent('schema.py')],
                             ['views.py', self._fcontent('views.py')]],}
         self.assertEqual(webreq.status_code, 200)
-        self.assertDictEqual(expect, loads(webreq.content))
+        self.assertDictEqual(expect, loads(webreq.text))
 
 
 class LanguageTC(CubicWebServerTC):