EdgeWatch/requirements-dev.txt
Richard Nixon c4329a9b9b test: add pytest suite for validation, alerting and WS auth
48 tests, ~0.1s total. Each case targets a specific bug class so the
file reads as a contract:

  - test_validation.py
      accepts well-formed device ids, rejects whitespace, slashes,
      colons, newlines, zero-width spaces, oversize values, HTML.
  - test_alert_predicate.py
      threshold boundary, bool-vs-int trap, NaN / inf / out-of-range,
      non-numeric payloads, per-device cooldown window.
  - test_active_snapshot.py
      recent vs stale, the "<= prune_seconds" boundary (inclusive),
      missing last_seen treated as ancient, empty state.
  - test_ws_token.py
      open mode, missing/wrong/empty/extra-param query strings, plus
      the happy path with the correct token.

conftest.py stubs MQTT_BROKER and prepends the repo root to sys.path
so `import backend` works without a .env file. Dev deps split into
requirements-dev.txt to keep the runtime image lean.
2026-05-17 14:45:00 +00:00

3 lines
56 B
Text

-r requirements.txt
pytest==8.4.2
pytest-asyncio==1.2.0