Skip to content
Snippets Groups Projects
Commit 06bd6a68c09d authored by Fabien Amarger's avatar Fabien Amarger
Browse files

fix: Use mock_aws instead of mock_s3

The moto@v5 do not implement mock_s3 anymore, it uses mock_aws instead.
This version is used since we do have a python3.9 project (under it uses a
moto@v4 in which mock_s3 is still present).
parent d634ad066206
No related branches found
No related tags found
1 merge request!64fix: Use mock_aws instead of mock_s3
Pipeline #226533 passed
import boto3
from unittest.mock import patch
from moto import mock_s3
from moto import mock_aws
class S3StorageTestMixin:
s3_bucket = "test-bucket"
def setUp(self):
......@@ -4,10 +4,10 @@
class S3StorageTestMixin:
s3_bucket = "test-bucket"
def setUp(self):
s3_mock = mock_s3()
s3_mock = mock_aws()
s3_mock.start()
resource = boto3.resource("s3", region_name="us-east-1")
self.s3_bucket = resource.create_bucket(Bucket=self.s3_bucket)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment