From cb747079d037c163349bd09814690682ae22a302 Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Thu, 7 Jun 2012 12:28:26 +0800 Subject: 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 --- tests/test_exception.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_exception.py') diff --git a/tests/test_exception.py b/tests/test_exception.py index c74a60c6..1cbc5810 100644 --- a/tests/test_exception.py +++ b/tests/test_exception.py @@ -13,11 +13,12 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + import uuid -import json from keystone.common import wsgi from keystone import exception +from keystone.openstack.common import jsonutils from keystone import test @@ -33,7 +34,7 @@ class ExceptionTestCase(test.TestCase): self.assertEqual(resp.status_int, e.code) self.assertEqual(resp.status, '%s %s' % (e.code, e.title)) - j = json.loads(resp.body) + j = jsonutils.loads(resp.body) self.assertIsNotNone(j.get('error')) self.assertIsNotNone(j['error'].get('code')) self.assertIsNotNone(j['error'].get('title')) -- cgit