Compare celebration stamps as whole entries; queue events
Child ids sharing a prefix no longer suppress each other (split and compare entries for equality), and queued mode keeps a second child's day-complete event from being dropped while the first notify runs.
This commit is contained in:
@@ -255,4 +255,20 @@ def test_celebration_never_hard_codes_notify_target() -> None:
|
||||
assert re.search(r"notify\.[a-z_]+", target_description), (
|
||||
"the input description should show a placeholder example"
|
||||
)
|
||||
assert bp["actions"][0]["action"] == BlueprintInput("notify_target")
|
||||
assert bp["actions"][0]["action"] == BlueprintInput("notify_target")
|
||||
|
||||
def test_celebration_dedupe_entry_equality_not_substring() -> None:
|
||||
"""Child ids sharing a prefix must not suppress each other: after
|
||||
child 11 is celebrated, child 1 still celebrates (whole-entry
|
||||
comparison, not substring)."""
|
||||
assert render_dedupe("11:2026-09-19", child_id=11) == "False"
|
||||
assert render_dedupe("11:2026-09-19", child_id=1) == "True", (
|
||||
"child 1's entry must not be found inside child 11's entry"
|
||||
)
|
||||
assert render_dedupe("1:2026-09-19", child_id=11) == "True"
|
||||
|
||||
|
||||
def test_celebration_mode_is_queued() -> None:
|
||||
"""Two children completing at nearly the same time must both be
|
||||
processed: queued mode does not drop the second event."""
|
||||
assert celebration()["mode"] == "queued"
|
||||
|
||||
Reference in New Issue
Block a user