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

@@ -27,7 +27,7 @@ def test_secrets_test_command(mock_secrets):
"""Test secrets test command.""" """Test secrets test command."""
result = runner.invoke(app, ["secrets", "test"]) result = runner.invoke(app, ["secrets", "test"])
assert result.exit_code == 0 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): def test_secrets_list_command(mock_secrets):

View File

@@ -121,7 +121,7 @@ def test_extract_cot_year_skips_existing_file(tmp_path, monkeypatch):
mock_head.headers = {"etag": f'"{etag}"'} mock_head.headers = {"etag": f'"{etag}"'}
mock_session.head.return_value = mock_head 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 assert result == 0
mock_session.get.assert_not_called() # No download should occur 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_head.status_code = 404
mock_session.head.return_value = mock_head 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 assert result == 0
mock_session.get.assert_not_called() mock_session.get.assert_not_called()