billscroll FT: backdate the 'recent' event 3h into the clock-time bucket — fixes test_recent_event_shows_time_format after the relative_ts <60min change
The shared relative_ts gained a <60min -> 'N min' bucket (a02f347), so a just-now auto_now_add event renders 'N min', not the g:i a clock time BillscrollEntryLayoutTest.test_recent_event_shows_time_format asserts -> red locally + in CI from that commit on. Backdate the 'recent' event 3h (still recent vs. the >1yr old event, but >60min) so it renders clock time, mirroring the existing old-event backdate. Data-only change; the layout/columns test is age-agnostic.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -391,12 +391,18 @@ class BillscrollEntryLayoutTest(FunctionalTest):
|
||||
super().setUp()
|
||||
self.founder = User.objects.create(email="founder@layout.io")
|
||||
self.room = Room.objects.create(name="Layout Chamber", owner=self.founder)
|
||||
# A fresh (< 24 h) event — timestamp is auto_now_add so always recent
|
||||
record(
|
||||
# A "recent" event in the 1h–24h clock-time bucket (g:i a). Backdated 3h
|
||||
# because the shared relative_ts now renders <60min as "N min" (a02f347)
|
||||
# — a just-now auto_now_add event would show "N min", not the clock time
|
||||
# this layout test asserts. Still recent vs. the >1yr old event below.
|
||||
recent = record(
|
||||
self.room, GameEvent.SLOT_FILLED, actor=self.founder,
|
||||
slot_number=1, token_type="coin",
|
||||
token_display="Fresh Coin", renewal_days=7,
|
||||
)
|
||||
GameEvent.objects.filter(pk=recent.pk).update(
|
||||
timestamp=timezone.now() - datetime.timedelta(hours=3)
|
||||
)
|
||||
# An old (> 1 year) event — backdate via queryset update to bypass auto_now_add
|
||||
old = record(
|
||||
self.room, GameEvent.SLOT_FILLED, actor=self.founder,
|
||||
|
||||
Reference in New Issue
Block a user