Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minio #1767

Merged
merged 16 commits into from
Feb 6, 2024
Merged

Minio #1767

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions unit_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -47,22 +47,6 @@ def s3_settings():
}


@pytest.fixture(scope="session")
def s3_settings():
# This is slightly awkward due to the fact that we want both `auto_mock_s3`
# and `set_aws_s3_settings` to set the same values but due to the fact that
# `auto_mock_s3` is session scoped it can't access `settings` and manipulate
# it directly so we have been forced to split those two fixtures out even
# though we want them to share the same variables
return {
"AWS_REGION": "eu-west-2",
"AWS_ACCESS_KEY_ID": "fake-key-id",
"AWS_SECRET_ACCESS_KEY": "fake-access-key",
"AWS_STORAGE_BUCKET_NAME": "test-uploads",
"AWS_S3_ENDPOINT_URL": None,
}


@pytest.fixture(autouse=True, scope="session")
def auto_mock_s3(s3_settings):
# This is scoped to session otherwise this slows down each test due to it
@@ -2583,14 +2567,6 @@ def mock_s3_files(settings):
region_name=settings.AWS_REGION,
)

def _create_files(*files):
s3 = boto3.client(
"s3",
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
region_name=settings.AWS_REGION,
)

def _create_files(*files):
for key, body, extras in files:
s3.put_object(