summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-03-22 21:14:26 -0700
committerJustin Santa Barbara <justin@fathomdb.com>2011-03-22 21:14:26 -0700
commit45d28dfb035b4e219845d44e00073d70211e8175 (patch)
treef6f92d85a6a4736f7584d1e350113d9142fbad10 /nova/tests
parent5c31b423ba5b5347aac62559c4e5c0a02f264213 (diff)
Fixed up unit tests and direct api that was also calling _serialize (naughty!)
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/test_limits.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/nova/tests/api/openstack/test_limits.py b/nova/tests/api/openstack/test_limits.py
index 05cfacc60..df367005d 100644
--- a/nova/tests/api/openstack/test_limits.py
+++ b/nova/tests/api/openstack/test_limits.py
@@ -136,10 +136,17 @@ class LimitsControllerTest(BaseLimitTestSuite):
request = self._get_index_request("application/xml")
response = request.get_response(self.controller)
- expected = "<limits><rate/><absolute/></limits>"
- body = response.body.replace("\n", "").replace(" ", "")
+ expected = parseString("""
+ <limits
+ xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
+ <rate/>
+ <absolute/>
+ </limits>
+ """.replace(" ", ""))
- self.assertEqual(expected, body)
+ body = parseString(response.body.replace(" ", ""))
+
+ self.assertEqual(expected.toxml(), body.toxml())
def test_index_xml(self):
"""Test getting limit details in XML."""
@@ -148,7 +155,8 @@ class LimitsControllerTest(BaseLimitTestSuite):
response = request.get_response(self.controller)
expected = parseString("""
- <limits>
+ <limits
+ xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
<rate>
<limit URI="*" regex=".*" remaining="10" resetTime="0"
unit="MINUTE" value="10" verb="GET"/>