diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-11-29 17:14:14 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-11-29 17:14:14 +0000 |
| commit | 85ae44a753281d7ed6019020cbdfcf7dd52dfd55 (patch) | |
| tree | 107c704afb48ac1a4a81111421e2742a3c608f4d /nova/tests | |
| parent | 5c33ce67908f03a620f4b9f2abc54ac7f0de993a (diff) | |
| parent | f58f2b48a1c5ebb01ef998720e5dbd1d88ed6e5d (diff) | |
Merge "Fix HostDeserializer to enable multiple line xml"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/compute/contrib/test_hosts.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_hosts.py b/nova/tests/api/openstack/compute/contrib/test_hosts.py index 8313cb00e..f56170a06 100644 --- a/nova/tests/api/openstack/compute/contrib/test_hosts.py +++ b/nova/tests/api/openstack/compute/contrib/test_hosts.py @@ -272,7 +272,7 @@ class HostTestCase(test.TestCase): class HostSerializerTest(test.TestCase): def setUp(self): super(HostSerializerTest, self).setUp() - self.deserializer = os_hosts.HostDeserializer() + self.deserializer = os_hosts.HostUpdateDeserializer() def test_index_serializer(self): serializer = os_hosts.HostIndexTemplate() @@ -336,9 +336,12 @@ class HostSerializerTest(test.TestCase): self.assertEqual(value, tree.get(key)) def test_update_deserializer(self): - exemplar = dict(status='enabled', foo='bar') - intext = ("<?xml version='1.0' encoding='UTF-8'?>\n" - '<updates><status>enabled</status><foo>bar</foo></updates>') + exemplar = dict(status='enabled', maintenance_mode='disable') + intext = """<?xml version='1.0' encoding='UTF-8'?> + <updates> + <status>enabled</status> + <maintenance_mode>disable</maintenance_mode> + </updates>""" result = self.deserializer.deserialize(intext) self.assertEqual(dict(body=exemplar), result) |
