From ce65164155dcf6dddf7695fbc5ca6352c121cc04 Mon Sep 17 00:00:00 2001 From: TerryHowe Date: Wed, 3 Jun 2015 17:18:38 -0600 Subject: Add functional tests for image set This patch includes functional tests for image set and it includes a change to use the OSC utils.format_dict method to format the properties. This will give a more user friendly format to the image commands and it gives a more consistent testable format to the output. Instead of: {u'a': u'b', u'c': u'd'} The user will see: a=b, c=d Change-Id: Ib396316586ffc5dbab231064d5b6dc9425507934 --- openstackclient/tests/image/v1/fakes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openstackclient/tests') diff --git a/openstackclient/tests/image/v1/fakes.py b/openstackclient/tests/image/v1/fakes.py index 972e6415..95a8a39c 100644 --- a/openstackclient/tests/image/v1/fakes.py +++ b/openstackclient/tests/image/v1/fakes.py @@ -30,7 +30,7 @@ image_properties = { 'Beta': 'b', 'Gamma': 'g', } -image_properties_str = "{'Alpha': 'a', 'Beta': 'b', 'Gamma': 'g'}" +image_properties_str = "Alpha='a', Beta='b', Gamma='g'" image_data = 'line 1\nline 2\n' IMAGE = { @@ -47,7 +47,9 @@ IMAGE = { } IMAGE_columns = tuple(sorted(IMAGE)) -IMAGE_data = tuple((IMAGE[x] for x in sorted(IMAGE))) +IMAGE_output = dict(IMAGE) +IMAGE_output['properties'] = image_properties_str +IMAGE_data = tuple((IMAGE_output[x] for x in sorted(IMAGE_output))) class FakeImagev1Client(object): -- cgit v1.2.1