Files
aprsd/tests
hemna c975dd85d8 fix: WatchList.stats() — remove early return that bypassed lock (#258)
stats() had a bare 'return self.data' on the first line that:
- returned the raw internal dict without holding self.lock (race condition)
- made the locked loop below unreachable dead code
- returned the wrong shape (callers expect age/old/packet/last keys, not
  the raw was_old_before_update internal key)

Remove the early return so the existing with self.lock: loop executes.

Tests added (tests/packets/test_watch_list.py):
- test_stats_empty: empty watch list returns {}
- test_stats_returns_enriched_shape: verifies the four expected keys are
  present and the raw-internal 'was_old_before_update' key is absent
- test_stats_not_raw_internal_dict: returned dict must not be wl.data itself
- setUp/tearDown: reset class-level data and initialized to prevent leakage

Closes #237
2026-08-28 12:35:58 -04:00
..
2025-12-09 17:20:23 -05:00
2026-01-06 18:57:54 -05:00
2025-12-09 17:20:23 -05:00
2026-01-05 17:00:03 -05:00