Skip to content

Commit 3dcddd8

Browse files
committed
Fix testing after fixture rename
1 parent 8790216 commit 3dcddd8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_stations.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import aiohttp
1414

1515

16-
async def _read_fixture(fixture: str = "ap-ptp"):
16+
async def _read_fixture(fixture: str = "airos_loco5ac_ap-ptp"):
1717
"""Read fixture file per device type."""
1818
fixture_dir = os.path.join(os.path.dirname(__file__), "..", "fixtures")
1919
path = os.path.join(fixture_dir, f"{fixture}.json")
@@ -26,9 +26,12 @@ async def _read_fixture(fixture: str = "ap-ptp"):
2626
pytest.fail(f"Invalid JSON in fixture file {path}: {e}")
2727

2828

29-
@pytest.mark.parametrize("mode", ["ap-ptp", "sta-ptp"])
29+
@pytest.mark.parametrize(
30+
"mode,fixture",
31+
[("ap-ptp", "airos_loco5ac_ap-ptp"), ("sta-ptp", "airos_loco5ac_sta-ptp")],
32+
)
3033
@pytest.mark.asyncio
31-
async def test_ap_object(airos_device, base_url, mode):
34+
async def test_ap_object(airos_device, base_url, mode, fixture):
3235
"""Test device operation."""
3336
cookie = SimpleCookie()
3437
cookie["session_id"] = "test-cookie"
@@ -42,7 +45,7 @@ async def test_ap_object(airos_device, base_url, mode):
4245
mock_login_response.cookies = cookie
4346
mock_login_response.headers = {"X-CSRF-ID": "test-csrf-token"}
4447
# --- Prepare fake GET /api/status response ---
45-
fixture_data = await _read_fixture(mode)
48+
fixture_data = await _read_fixture(fixture)
4649
mock_status_payload = fixture_data
4750
mock_status_response = MagicMock()
4851
mock_status_response.__aenter__.return_value = mock_status_response

0 commit comments

Comments
 (0)