From d9deffcba4ff6ab3b5a6459c9d626dc4f5334336 Mon Sep 17 00:00:00 2001 From: Michael Gundlach Date: Tue, 19 Oct 2010 19:39:20 -0400 Subject: Add unit test for XML requests converting errors to Faults --- nova/tests/api/openstack/test_api.py | 7 +++++-- 1 file 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('