Skip to content

Commit 9bbd98b

Browse files
committed
fix: update archives test to match static catalog default
1 parent 8160f91 commit 9bbd98b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/test_managers.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,20 @@ def test_historical_returns_dataframe(
5858

5959

6060
class TestArchivesManager:
61-
def test_list(self, client, mock_httpx, sample_archives_list_response):
61+
def test_list_local(self, client):
62+
"""Default list() returns static catalog (153 archives)."""
63+
df = client.archives.list()
64+
assert isinstance(df, pd.DataFrame)
65+
assert len(df) == 153
66+
67+
def test_list_api(self, client, mock_httpx, sample_archives_list_response):
68+
"""list(source='api') queries the ESIOS API."""
6269
response = MagicMock()
6370
response.status_code = 200
6471
response.json.return_value = sample_archives_list_response
6572
mock_httpx.get.return_value = response
6673

67-
df = client.archives.list()
74+
df = client.archives.list(source="api")
6875
assert isinstance(df, pd.DataFrame)
6976
assert len(df) == 2
7077

0 commit comments

Comments
 (0)