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"

View File

@@ -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)