feat: initialize managed portal
This commit is contained in:
15
managed/store_dwell_alert/tests/test_notifier.py
Normal file
15
managed/store_dwell_alert/tests/test_notifier.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import json
|
||||
|
||||
from app.modules.notifier import append_json_event
|
||||
|
||||
|
||||
def test_append_json_event_writes_jsonl(tmp_path):
|
||||
output = tmp_path / "logs" / "events.jsonl"
|
||||
|
||||
append_json_event(output, {"event": "long_stay_alert", "count": 5})
|
||||
append_json_event(output, {"event": "half_hour_report", "count": 3})
|
||||
|
||||
lines = output.read_text(encoding="utf-8").splitlines()
|
||||
|
||||
assert json.loads(lines[0]) == {"event": "long_stay_alert", "count": 5}
|
||||
assert json.loads(lines[1]) == {"event": "half_hour_report", "count": 3}
|
||||
Reference in New Issue
Block a user