summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria@us.ibm.com>2013-01-25 10:44:23 -0500
committerGiampaolo Lauria <lauria@us.ibm.com>2013-01-29 12:55:14 -0500
commit2b602148be8ffa9aec377fc2c220464d9c43c885 (patch)
tree1f688cc0f15cae72a979063620ccfdc511f8ffb3 /nova/tests
parent7a01888b3f663c2292dc4ed9ff36436fdffa9b3e (diff)
Fix get and update in FlavorExtraSpecs
Fixes bug 1105170 Added serializer test Change-Id: I365a81e17319fa96d53b53eafb6326fff8bde288
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py b/nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py
index bc9f66eb2..03f6a8f48 100644
--- a/nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py
+++ b/nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py
@@ -182,3 +182,10 @@ class FlavorsExtraSpecsXMLSerializerTest(test.TestCase):
'<extra_specs><key1>value1</key1></extra_specs>')
result = deserializer.deserialize(intext)['body']
self.assertEqual(result, expected)
+
+ def test_show_update_serializer(self):
+ serializer = flavorextraspecs.ExtraSpecTemplate()
+ expected = ("<?xml version='1.0' encoding='UTF-8'?>\n"
+ '<extra_spec key="key1">value1</extra_spec>')
+ text = serializer.serialize(dict({"key1": "value1"}))
+ self.assertEqual(text, expected)