Skip to content

Commit

Permalink
chore: rollback fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JBOClara committed Dec 20, 2023
1 parent 8ce9bf2 commit d4bb758
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion medusa/storage/s3_base_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ def _consolidate_credentials(config) -> CensoredCredentials:
session.set_config_variable('credentials_file', config.key_file)

boto_credentials = session.get_credentials()

return CensoredCredentials(
access_key_id=boto_credentials.access_key,
secret_access_key=boto_credentials.secret_key,
Expand Down
18 changes: 9 additions & 9 deletions tests/storage/s3_storage_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ def test_credentials_from_env_without_profile(self):
os.environ["AWS_SECRET_ACCESS_KEY"] = "secret-from-env"

config = AttributeDict({
"api_profile": None,
"region": "region-from-config",
"storage_provider": "s3_us_west_oregon",
"key_file": empty_file.name,
"concurrent_transfers": "1",
'api_profile': None,
'region': 'region-from-config',
'storage_provider': 's3_us_west_oregon',
'key_file': empty_file.name,
'concurrent_transfers': '1',
})

credentials = S3BaseStorage._consolidate_credentials(config)
self.assertEqual("key-from-env", credentials.access_key_id)
self.assertEqual("region-from-config", credentials.region)
self.assertEqual('key-from-env', credentials.access_key_id)
self.assertEqual('region-from-config', credentials.region)

del os.environ["AWS_ACCESS_KEY_ID"]
del os.environ["AWS_SECRET_ACCESS_KEY"]
del os.environ['AWS_ACCESS_KEY_ID']
del os.environ['AWS_SECRET_ACCESS_KEY']

def test_credentials_from_file(self):
credentials_file_content = """
Expand Down

0 comments on commit d4bb758

Please sign in to comment.