Merge "Change with_data=False for swift_get_container" into stable/ussuri
This commit is contained in:
commit
f276f0226d
@ -177,7 +177,7 @@ def swift_get_containers(request, marker=None, prefix=None):
|
||||
|
||||
@profiler.trace
|
||||
@safe_swift_exception
|
||||
def swift_get_container(request, container_name, with_data=True):
|
||||
def swift_get_container(request, container_name, with_data=False):
|
||||
if with_data:
|
||||
headers, data = swift_api(request).get_object(container_name, "")
|
||||
else:
|
||||
|
@ -46,7 +46,8 @@ class SwiftApiTests(test.APIMockTestCase):
|
||||
swift_api = mock_swiftclient.return_value
|
||||
swift_api.get_object.return_value = (container, objects)
|
||||
|
||||
cont = api.swift.swift_get_container(self.request, container.name)
|
||||
cont = api.swift.swift_get_container(self.request, container.name,
|
||||
with_data=True)
|
||||
|
||||
self.assertEqual(container.name, cont.name)
|
||||
self.assertEqual(len(objects), len(cont.data))
|
||||
|
Loading…
Reference in New Issue
Block a user