Merge "Add functional tests for flavor metadata"

This commit is contained in:
Jenkins 2015-07-06 17:04:02 +00:00 committed by Gerrit Code Review
commit 1a45b20ba1

View File

@ -44,3 +44,13 @@ class FlavorTests(test.TestCase):
opts = self.get_show_opts(self.FIELDS)
raw_output = self.openstack('flavor show ' + self.NAME + opts)
self.assertEqual(self.NAME + "\n", raw_output)
def test_flavor_properties(self):
opts = self.get_show_opts(["properties"])
raw_output = self.openstack(
'flavor set --property a=b --property c=d ' + self.NAME + opts)
self.assertEqual("a='b', c='d'\n", raw_output)
raw_output = self.openstack('flavor unset --property a ' +
self.NAME + opts)
self.assertEqual("c='d'\n", raw_output)