Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Fisher <[email protected]>
Co-authored-by: Chuck Daniels <[email protected]>
  • Loading branch information
3 people authored Jul 26, 2024
1 parent c7aab14 commit eec5465
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ def test_auth_can_create_authenticated_requests_sessions():
assertions.assertTrue("Bearer" in session.headers["Authorization"])


@pytest.mark.parametrize("daac", [daac for daac in earthaccess.daac.DAACS])
@pytest.mark.parametrize("daac", earthaccess.daac.DAACS)
def test_auth_can_fetch_s3_credentials(daac):
activate_environment()
auth = earthaccess.login(strategy="environment")
assertions.assertTrue(auth.authenticated)
try:
logger.info(f"Testing S3 credentials for {daac['short-name']}")
credentials = earthaccess.get_s3_credentials(daac["short-name"])
assertions.assertIsInstance(credentials, dict)
assertions.assertTrue("accessKeyId" in credentials)
assert isinstance(credentials, dict)
assert "accessKeyId" in credentials
except Exception as e:
logger.error(
f"An error occured while trying to fetch S3 credentials for {daac['short-name']}: {e}"
Expand Down

0 comments on commit eec5465

Please sign in to comment.