Skip to content

Fill test gaps: devices loader, get_all_data, dashboard smoke test#2

Merged
vpadman1 merged 1 commit intomainfrom
vignesh/fill-test-gaps
Apr 16, 2026
Merged

Fill test gaps: devices loader, get_all_data, dashboard smoke test#2
vpadman1 merged 1 commit intomainfrom
vignesh/fill-test-gaps

Conversation

@vpadman1
Copy link
Copy Markdown
Owner

Summary

Adds test coverage for previously untested parts of the codebase. No runtime code changes.

  • tests/test_devices.py (new) — covers load_driver happy path, YAML default fallbacks for both host and username, CLI override, and unknown-device error. Catches the bug fixed in PR Post-review fixes: username bug, CI, platform marker, README polish #1 (username default short-circuit).
  • tests/test_base_driver.py — adds TestGetAllData covering band splitting by X_TP_Band, index fallback for single-band routers, client SSID enrichment, unknown-iface fallback, and empty-state behaviour.
  • tests/test_dashboard.py (new) — smoke test that instantiates WifiDashboard with a fake driver and runs compose() to catch import/reactive-binding regressions.
  • tests/conftest.py (new) — shared fake_driver fixture that stubs out the five BaseDriver abstract methods, replacing three copy-pasted FakeDriver classes across the test suite.

Test plan

  • uv run pytest -v — 41/41 passing locally (27 existing + 14 new)
  • uvx ruff check . — clean
  • CI green

- tests/test_devices.py: covers load_driver happy path, YAML default fallbacks,
  CLI override, and unknown device error (14 new tests).
- tests/test_base_driver.py: adds TestGetAllData covering band splitting by
  X_TP_Band, index fallback for single-band routers, client SSID enrichment,
  unknown-iface fallback, and empty-state behaviour.
- tests/test_dashboard.py: smoke test that instantiates WifiDashboard with a
  fake driver and runs compose() to catch import/reactive-binding regressions.
@vpadman1 vpadman1 merged commit 2a76e78 into main Apr 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant