PEP8: use short name for mock method

This commit is contained in:
Victor Torres 2019-02-06 18:38:17 -02:00
parent ad83ffdf1f
commit 126207fb7b
1 changed files with 4 additions and 4 deletions

View File

@ -247,9 +247,9 @@ class S3FeedStorageTest(unittest.TestCase):
self.assertEqual(storage.secret_key, 'secret_key')
self.assertEqual(storage.acl, None)
with mock.patch('botocore.client.BaseClient._make_api_call') as _make_api_call_mock:
with mock.patch('botocore.client.BaseClient._make_api_call') as m:
storage._store_in_thread(BytesIO(b'test file'))
operation_name, api_params = _make_api_call_mock.call_args[0]
operation_name, api_params = m.call_args[0]
self.assertEqual(operation_name, 'PutObject')
self.assertNotIn('ACL', api_params)
@ -264,9 +264,9 @@ class S3FeedStorageTest(unittest.TestCase):
self.assertEqual(storage.secret_key, 'secret_key')
self.assertEqual(storage.acl, 'custom-acl')
with mock.patch('botocore.client.BaseClient._make_api_call') as _make_api_call_mock:
with mock.patch('botocore.client.BaseClient._make_api_call') as m:
storage._store_in_thread(BytesIO(b'test file'))
operation_name, api_params = _make_api_call_mock.call_args[0]
operation_name, api_params = m.call_args[0]
self.assertEqual(operation_name, 'PutObject')
self.assertEqual(api_params.get('ACL'), 'custom-acl')