diff options
author | Zhongyue Luo <lzyeval@gmail.com> | 2012-06-07 12:28:26 +0800 |
---|---|---|
committer | Zhongyue Luo <lzyeval@gmail.com> | 2012-06-28 06:04:53 +0800 |
commit | cb747079d037c163349bd09814690682ae22a302 (patch) | |
tree | 9c92ac38f6ad3824e781b8ac9d259c57002711a4 /tests/test_middleware.py | |
parent | 23ca656927947dada40591bdd1badd5a531c2983 (diff) | |
download | keystone-cb747079d037c163349bd09814690682ae22a302.tar.gz keystone-cb747079d037c163349bd09814690682ae22a302.tar.xz keystone-cb747079d037c163349bd09814690682ae22a302.zip |
Keystone should use openstack.common.jsonutils
Implements blueprint use-common-jsonutils
1. Edit openstack-common.conf and import keystone/openstack/common/jsonutils.py
2. Remove json package imports and replace with jsonutils
Client code in vendor/ hasn't been changed
Change-Id: I57c670fde9f2c2241eddab1b012e8d5e6a72deb7
Diffstat (limited to 'tests/test_middleware.py')
-rw-r--r-- | tests/test_middleware.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_middleware.py b/tests/test_middleware.py index fca39775..506ff85b 100644 --- a/tests/test_middleware.py +++ b/tests/test_middleware.py @@ -14,13 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. -import json - import webob from keystone import config from keystone import middleware from keystone import test +from keystone.openstack.common import jsonutils CONF = config.CONF @@ -151,7 +150,7 @@ class XmlBodyMiddlewareTest(test.TestCase): method='POST') middleware.XmlBodyMiddleware(None).process_request(req) self.assertTrue(req.content_type, 'application/json') - self.assertTrue(json.loads(req.body)) + self.assertTrue(jsonutils.loads(req.body)) def test_json_unnaffected(self): """JSON-only requests should be unnaffected by the XML middleware.""" |