--- a/web/test/unittest_views_json.py Fri Oct 21 13:05:45 2011 +0200
+++ b/web/test/unittest_views_json.py Fri Oct 21 14:32:18 2011 +0200
@@ -1,6 +1,6 @@
from cubicweb.devtools.testlib import CubicWebTC
-from json import loads
+from cubicweb.utils import json
class JsonViewsTC(CubicWebTC):
@@ -35,7 +35,7 @@
def test_json_ersetexport(self):
req = self.request()
rset = req.execute('Any G ORDERBY GN WHERE G is CWGroup, G name GN')
- data = loads(self.view('ejsonexport', rset))
+ data = json.loads(self.view('ejsonexport', rset))
self.assertEqual(req.headers_out.getRawHeaders('content-type'), ['application/json'])
self.assertEqual(data[0]['name'], 'guests')
self.assertEqual(data[1]['name'], 'managers')