summaryrefslogtreecommitdiffstats
path: root/tests/test_exception.py
diff options
context:
space:
mode:
authorZhongyue Luo <lzyeval@gmail.com>2012-06-07 12:28:26 +0800
committerZhongyue Luo <lzyeval@gmail.com>2012-06-28 06:04:53 +0800
commitcb747079d037c163349bd09814690682ae22a302 (patch)
tree9c92ac38f6ad3824e781b8ac9d259c57002711a4 /tests/test_exception.py
parent23ca656927947dada40591bdd1badd5a531c2983 (diff)
downloadkeystone-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_exception.py')
-rw-r--r--tests/test_exception.py5
1 files changed, 3 insertions, 2 deletions
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'))