summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-10-19 19:39:20 -0400
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-10-19 19:39:20 -0400
commitd9deffcba4ff6ab3b5a6459c9d626dc4f5334336 (patch)
tree47d3129feaf97cd59da0ee8bfe7ce2b3ab41e131
parent86a8a5a2091dc0a36ccbe05f46609c82b1060291 (diff)
Add unit test for XML requests converting errors to Faults
-rw-r--r--nova/tests/api/openstack/test_api.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/tests/api/openstack/test_api.py b/nova/tests/api/openstack/test_api.py
index 171818806..a8c0ff9f8 100644
--- a/nova/tests/api/openstack/test_api.py
+++ b/nova/tests/api/openstack/test_api.py
@@ -59,7 +59,10 @@ class APITest(unittest.TestCase):
api.application = fail
resp = Request.blank('/').get_response(api)
- self.assertTrue('cloudServersFault' in resp.body, resp.body)
+ self.assertTrue('{"cloudServersFault' in resp.body, resp.body)
self.assertEqual(resp.status_int, 500, resp.body)
-
+ api.application = fail
+ resp = Request.blank('/.xml').get_response(api)
+ self.assertTrue('<cloudServersFault' in resp.body, resp.body)
+ self.assertEqual(resp.status_int, 500, resp.body)