fix(tests): update test assertions to match refactored function signatures
Some checks failed
CI / test-cli (push) Successful in 11s
CI / test-sqlmesh (push) Successful in 13s
CI / test-web (push) Failing after 11s
CI / tag (push) Has been skipped

- 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 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-28 01:56:13 +01:00
parent 66d484955d
commit d58fa67238
2 changed files with 3 additions and 3 deletions

View File

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