provozni zaloha
This commit is contained in:
@@ -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)"]
|
||||
|
||||
Reference in New Issue
Block a user