test: add tests for status WebSocket and scheduler

- test_status.py: 8 tests covering WS auth rejection/acceptance, broadcast_status (dead connection removal, no response_time, no connections), broadcast_scan_update
- test_scheduler.py: 9 tests covering _load_interval variants, _run_status_checks DB update/last_seen/error handling, start/stop lifecycle
- scheduler.py: reinitialize AsyncIOScheduler on each start() to avoid stale event loop across test restarts
This commit is contained in:
Pouzor
2026-03-09 01:32:31 +01:00
parent 20fe4ed9e4
commit 8da39327ab
4 changed files with 343 additions and 1 deletions
+3
View File
@@ -25,3 +25,6 @@ addopts = "--tb=short -q"
[tool.coverage.run]
source = ["app"]
omit = ["*/migrations/*", "*/tests/*"]
[tool.coverage.report]
skip_empty = true