From d58fa672382681f0452c05affb5a1a2915d4ed58 Mon Sep 17 00:00:00 2001 From: Deeman Date: Sat, 28 Feb 2026 01:56:13 +0100 Subject: [PATCH] fix(tests): update test assertions to match refactored function signatures - Pass url_template and landing_subdir to extract_cot_year (signature changed to support both COT variants) - Update secrets test assertion from 'ESC connection successful' to 'SOPS decryption successful' Co-Authored-By: Claude Sonnet 4.6 --- tests/test_cli_e2e.py | 2 +- tests/test_cot_extraction.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_cli_e2e.py b/tests/test_cli_e2e.py index c560965..1a10589 100644 --- a/tests/test_cli_e2e.py +++ b/tests/test_cli_e2e.py @@ -27,7 +27,7 @@ def test_secrets_test_command(mock_secrets): """Test secrets test command.""" result = runner.invoke(app, ["secrets", "test"]) assert result.exit_code == 0 - assert "ESC connection successful" in result.stdout + assert "SOPS decryption successful" in result.stdout def test_secrets_list_command(mock_secrets): diff --git a/tests/test_cot_extraction.py b/tests/test_cot_extraction.py index 41896f4..17f94c6 100644 --- a/tests/test_cot_extraction.py +++ b/tests/test_cot_extraction.py @@ -121,7 +121,7 @@ def test_extract_cot_year_skips_existing_file(tmp_path, monkeypatch): mock_head.headers = {"etag": f'"{etag}"'} mock_session.head.return_value = mock_head - result = cot_execute.extract_cot_year(2024, mock_session) + result = cot_execute.extract_cot_year(2024, mock_session, cot_execute.COT_URL_FUTURES_ONLY, "cot") assert result == 0 mock_session.get.assert_not_called() # No download should occur @@ -141,7 +141,7 @@ def test_extract_cot_year_returns_false_on_404(tmp_path, monkeypatch): mock_head.status_code = 404 mock_session.head.return_value = mock_head - result = cot_execute.extract_cot_year(2006, mock_session) + result = cot_execute.extract_cot_year(2006, mock_session, cot_execute.COT_URL_FUTURES_ONLY, "cot") assert result == 0 mock_session.get.assert_not_called()