increase code coverage

This commit is contained in:
Kenneth Kehl
2025-06-27 09:48:34 -07:00
parent 0b5efda50d
commit 1d527e6c1d
2 changed files with 15 additions and 0 deletions

View File

@@ -601,3 +601,17 @@ def test_get_s3_files_handles_exception(mocker):
mock_current_app.logger.exception.assert_called_with(
"Trouble reading file2.csv which is # 1 during cache regeneration"
)
def test_get_s3_client_with_env_credentials():
with patch.dict(
os.environ,
{
"AWS_ACCESS_KEY_ID": "test-key",
"AWS_SECRET_ACCESS_ID": "test-sekret",
"AWS_DEFAULT_REGION": "us-north-1",
},
):
client = get_s3_client()
assert client is not None, "Client should be created with env credentials"
assert client._client_config.region_name == "us-north-1"