From 6f1729010f64bffb5671973936cccc3580b940be Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Mon, 8 Jun 2026 19:53:27 -0400 Subject: [PATCH] =?UTF-8?q?billscroll=20FT:=20backdate=20the=20'recent'=20?= =?UTF-8?q?event=203h=20into=20the=20clock-time=20bucket=20=E2=80=94=20fix?= =?UTF-8?q?es=20test=5Frecent=5Fevent=5Fshows=5Ftime=5Fformat=20after=20th?= =?UTF-8?q?e=20relative=5Fts=20<60min=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/functional_tests/test_billboard.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/functional_tests/test_billboard.py b/src/functional_tests/test_billboard.py index dc55353..c42d46c 100644 --- a/src/functional_tests/test_billboard.py +++ b/src/functional_tests/test_billboard.py @@ -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,