devtools/testlib.py
branchstable
changeset 5377 84d14ddfae13
parent 5268 b4bb59824d72
child 5385 b6e250dd7a7d
child 5389 809d3b5b3d31
--- a/devtools/testlib.py	Thu Apr 22 19:37:56 2010 +0000
+++ b/devtools/testlib.py	Thu Apr 22 19:48:04 2010 +0000
@@ -14,7 +14,10 @@
 from math import log
 from contextlib import contextmanager
 
-import simplejson
+try:
+    import json
+except ImportError:
+    import simplejson as json
 
 import yams.schema
 
@@ -483,7 +486,7 @@
 
     def remote_call(self, fname, *args):
         """remote json call simulation"""
-        dump = simplejson.dumps
+        dump = json.dumps
         args = [dump(arg) for arg in args]
         req = self.request(fname=fname, pageid='123', arg=args)
         ctrl = self.vreg['controllers'].select('json', req)