provozni zaloha

This commit is contained in:
lachtan
2026-06-24 08:11:12 +02:00
parent 9295dba19f
commit 1db3ec4756
97 changed files with 7698 additions and 817 deletions

View File

@@ -167,11 +167,13 @@ def test_fires_sorted_across_types(conn):
def test_format_empty_window():
assert format_upcoming([]) == ["(nothing scheduled in this window)"]
assert format_upcoming([], {}) == ["(nothing scheduled in this window)"]
def test_format_line_shape():
lines = format_upcoming([
{"fire_time": datetime(2026, 6, 10, 9, 0), "id": 1, "text": "call mom", "schedule_type": "cron"},
])
assert lines == ["2026-06-10 09:00 #1 call mom (cron)"]
def test_format_line_shape_uses_display_id():
# Internal id 5 maps to display ID 2 — the line shows the display ID.
lines = format_upcoming(
[{"fire_time": datetime(2026, 6, 10, 9, 0), "id": 5, "text": "call mom", "schedule_type": "cron"}],
{5: 2},
)
assert lines == ["2026-06-10 09:00 #2 call mom (cron)"]