[autotest] Use |json| instead of |simplejson|.
simplejson was moved into the library as of python 2.4. We're now at
python 2.6/2.7, and having to keep installing simplejson everywhere has
slowly turned into a hassle. Since we can just trivially drop/rename
it, let's do so.
The rpc_interface parts of this change have been vetted, the rest is
done just as a s/simplejson/json/ across the code, which afaik should be
a safe thing to do.
BUG=None
TEST=unit, run_suite
DEPLOY=apache
Change-Id: Iab35f71157e7e5cd3be5291c776b07eb3283be8e
Reviewed-on: https://gerrit.chromium.org/gerrit/46424
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/frontend/shared/resource_test_utils.py b/frontend/shared/resource_test_utils.py
index 8cb742f..f52cd3b 100644
--- a/frontend/shared/resource_test_utils.py
+++ b/frontend/shared/resource_test_utils.py
@@ -1,5 +1,5 @@
import operator, unittest
-import simplejson
+import json
from django.test import client
from autotest_lib.frontend.afe import frontend_test_utils, models as afe_models
@@ -53,7 +53,7 @@
if 'data' in kwargs:
kwargs.setdefault('content_type', 'application/json')
if kwargs['content_type'] == 'application/json':
- kwargs['data'] = simplejson.dumps(kwargs['data'])
+ kwargs['data'] = json.dumps(kwargs['data'])
if uri.startswith('http://'):
full_uri = uri
@@ -72,7 +72,7 @@
return response.content
try:
- return simplejson.loads(response.content)
+ return json.loads(response.content)
except ValueError:
self.fail('Invalid reponse body: %s' % response.content)