chore: Replaced boto usage with boto3. (#31886)

* chore: Replaced boto usage with boto3.
This commit is contained in:
Awais Qureshi
2023-03-07 15:47:48 +05:00
committed by GitHub
parent c51f0dad00
commit 20ef29da53
9 changed files with 22 additions and 22 deletions

View File

@@ -115,16 +115,16 @@ def skip_signal(signal, **kwargs):
signal.connect(**kwargs)
class MockS3BotoMixin:
class MockS3Boto3Mixin:
"""
TestCase mixin that mocks the S3BotoStorage save method and s3 connection.
TestCase mixin that mocks the S3Boto3Storage save method and s3 connection.
"""
def setUp(self):
super().setUp()
self._mocked_connection = patch('boto.connect_s3', return_value=Mock())
self._mocked_connection = patch('boto3.resource', return_value=Mock())
self.mocked_connection = self._mocked_connection.start()
self.patcher = patch('storages.backends.s3boto.S3BotoStorage.save')
self.patcher = patch('storages.backends.s3boto3.S3Boto3Storage.save')
self.patcher.start()
def tearDown(self):