mgr/snap_schedule: stop comparing created against now field by field
test_created_now takes two independent datetime.now() readings, one
inside Schedule.__init__ when the simple_schedule fixture is built, one
in the test body, then compares minute/hour/day/month/year across them.
Any clock boundary crossing between the two reads makes them legitimately
differ:
> assert simple_schedule.created.minute == now.minute
E assert 13 == 14
E + where 13 = datetime.datetime(2026, 7, 2, 11, 13, 59, 998283).minute
E + where datetime.datetime(2026, 7, 2, 11, 14, 0, 15569).minute
Compare a time delta instead: the test only cares whether created is
approximately now, not whether two nearby clock reads happen to agree
field by field. tzinfo stays a plain equality check, it doesn't drift
between two nearby reads.
Signed-off-by: Kefu Chai <k.chai@proxmox.com> K
Kefu Chai committed
2ec8f9cb5d03e4d052a44a06b0a1cd896bb4d2fb
Parent: 478a38d