You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(circulation): prevent test failures after 23:00 UTC
Tests comparing loan due-dates against datetime.now() would fail when
run after 23:00 UTC because the loan creation and the assertion could
straddle midnight CET (UTC+1/+2) and land on different calendar days.
- libraries/api.py: always convert input to library local timezone
before checking day name and opening times in is_open()
- test_loans_rest.py: freeze time around checkout + assertion so both
calls see the same instant
- test_actions_extend.py: freeze time around extend_loan() + assertion
for the same reason; use timezone-aware datetime.now(timezone.utc)
- test_extend_external.py: mirror the next_open() logic used by
get_extension_params() so the expected date is computed the same way
Co-Authored-by: Peter Weber <peter.weber@rero.ch>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments