test(audit): the day-group fixture is a def, not a lambda (ruff E731)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m14s
CI / unit (push) Successful in 1m29s
CI / publish (push) Successful in 1m56s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 08:32:40 -04:00
co-authored by Claude Opus 5.5
parent 7ce61a2099
commit efa1a5f4f6
+4 -1
View File
@@ -114,7 +114,10 @@ def test_dividers_open_each_day_group_once_even_across_pages():
dividers, with every row's own date beside it."""
from steward.audit.service import mark_day_groups
now = datetime(2026, 10, 8, 18, 0, tzinfo=timezone.utc)
at = lambda d, h=12: NS(timestamp=datetime(2026, 10, d, h, 0, tzinfo=timezone.utc))
def at(d, h=12):
return NS(timestamp=datetime(2026, 10, d, h, 0, tzinfo=timezone.utc))
page1 = [{"event": at(8)}, {"event": at(8, 9)}, {"event": at(7)}, {"event": at(5)}]
assert mark_day_groups(page1, timezone.utc, "", now) == "Last 7 days"
assert [(i["group"], i["opens_group"]) for i in page1] == [