Skip to content

Commit

Permalink
Fix tests on a leap year date
Browse files Browse the repository at this point in the history
  • Loading branch information
rth committed Feb 29, 2024
1 parent ac7a938 commit f632800
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ramp-frontend/ramp_frontend/tests/test_ramp.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,27 +245,27 @@ def test_user_event_status(client_session):
NOW = datetime.datetime.now()
testtimestamps = [
(
NOW.replace(year=NOW.year + 1),
NOW.replace(year=NOW.year + 2),
NOW.replace(year=NOW.year + 3),
NOW.replace(year=NOW.year + 1, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year + 2, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year + 3, day=min(NOW.day - 2, 1)),
b"event-close",
),
(
NOW.replace(year=NOW.year - 1),
NOW.replace(year=NOW.year + 1),
NOW.replace(year=NOW.year + 2),
NOW.replace(year=NOW.year - 1, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year + 1, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year + 2, day=min(NOW.day - 2, 1)),
b"event-comp",
),
(
NOW.replace(year=NOW.year - 2),
NOW.replace(year=NOW.year - 1),
NOW.replace(year=NOW.year + 1),
NOW.replace(year=NOW.year - 2, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year - 1, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year + 1, day=min(NOW.day - 2, 1)),
b"event-collab",
),
(
NOW.replace(year=NOW.year - 3),
NOW.replace(year=NOW.year - 2),
NOW.replace(year=NOW.year - 1),
NOW.replace(year=NOW.year - 3, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year - 2, day=min(NOW.day - 2, 1)),
NOW.replace(year=NOW.year - 1, day=min(NOW.day - 2, 1)),
b"event-close",
),
]
Expand Down

0 comments on commit f632800

Please sign in to comment.