diff --git a/tests/app/aws/test_s3.py b/tests/app/aws/test_s3.py index fa387553b..f4a75b3dc 100644 --- a/tests/app/aws/test_s3.py +++ b/tests/app/aws/test_s3.py @@ -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" diff --git a/tests/app/dao/test_jobs_dao.py b/tests/app/dao/test_jobs_dao.py index 265c6521a..910cfa12b 100644 --- a/tests/app/dao/test_jobs_dao.py +++ b/tests/app/dao/test_jobs_dao.py @@ -562,6 +562,7 @@ def test_unique_key_on_job_id_and_job_row_number_no_error_if_row_number_for_diff def test_jobs_with_same_activity_time_are_sorted_by_id(sample_template): from datetime import datetime + dt = datetime(2023, 1, 1, 12, 0, 0) job1 = create_job(sample_template, created_at=dt, processing_started=None)