Merge "tests: Fix call assertion"

This commit is contained in:
Zuul 2024-01-02 20:17:06 +00:00 committed by Gerrit Code Review
commit 7e65d10199

@ -867,12 +867,13 @@ class TestShell(unittest.TestCase):
fh.write(b'12345678901234567890') fh.write(b'12345678901234567890')
swiftclient.shell.main(argv) swiftclient.shell.main(argv)
expected_calls = [mock.call('container', expected_calls = [mock.call('container',
{'X-Storage-Policy': mock.ANY}, {'X-Storage-Policy': 'one'},
response_dict={}), response_dict={}),
mock.call('container_segments', mock.call('container_segments',
{'X-Storage-Policy': mock.ANY}, {'X-Storage-Policy': 'one'},
response_dict={})] response_dict={})]
connection.return_value.put_container.has_calls(expected_calls) connection.return_value.put_container.assert_has_calls(expected_calls,
any_order=True)
connection.return_value.put_object.assert_called_with( connection.return_value.put_object.assert_called_with(
'container', 'container',
self.tmpfile.lstrip('/'), self.tmpfile.lstrip('/'),