From 74a6a81ae9d2c92575f4be531aa88fbd5dae9819 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Mon, 14 Dec 2015 03:30:00 -0500 Subject: when fetching object store properties use lower() sometimes properties within object store concepts are stored with mixed case depending on the client used to store said properties. when retrieving properties to 'show' the user, always call lower() on the property in question when comparing it to the reserved values of the swift API. Change-Id: I97ffc715788ca3cd021413124b6945a399465c99 Closes-Bug: 1525805 --- openstackclient/tests/api/test_object_store_v1.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openstackclient/tests/api') diff --git a/openstackclient/tests/api/test_object_store_v1.py b/openstackclient/tests/api/test_object_store_v1.py index 992bf261..8cc3a927 100644 --- a/openstackclient/tests/api/test_object_store_v1.py +++ b/openstackclient/tests/api/test_object_store_v1.py @@ -157,6 +157,7 @@ class TestContainer(TestObjectAPIv1): 'container': 'qaz', 'object_count': '1', 'bytes_used': '577', + 'properties': {'Owner': FAKE_ACCOUNT}, } self.requests_mock.register_uri( 'HEAD', @@ -309,6 +310,7 @@ class TestObject(TestObjectAPIv1): 'etag': 'qaz', 'x-container-meta-owner': FAKE_ACCOUNT, 'x-object-meta-wife': 'Wilma', + 'x-object-meta-Husband': 'fred', 'x-tra-header': 'yabba-dabba-do', } resp = { @@ -319,7 +321,8 @@ class TestObject(TestObjectAPIv1): 'content-length': '577', 'last-modified': '20130101', 'etag': 'qaz', - 'properties': {'wife': 'Wilma'}, + 'properties': {'wife': 'Wilma', + 'Husband': 'fred'}, } self.requests_mock.register_uri( 'HEAD', -- cgit v1.2.1