test(audit): the day-group fixture is a def, not a lambda (ruff E731)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,7 +114,10 @@ def test_dividers_open_each_day_group_once_even_across_pages():
|
|||||||
dividers, with every row's own date beside it."""
|
dividers, with every row's own date beside it."""
|
||||||
from steward.audit.service import mark_day_groups
|
from steward.audit.service import mark_day_groups
|
||||||
now = datetime(2026, 10, 8, 18, 0, tzinfo=timezone.utc)
|
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)}]
|
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 mark_day_groups(page1, timezone.utc, "", now) == "Last 7 days"
|
||||||
assert [(i["group"], i["opens_group"]) for i in page1] == [
|
assert [(i["group"], i["opens_group"]) for i in page1] == [
|
||||||
|
|||||||
Reference in New Issue
Block a user