From 4d893d56b24dfa9f0bb837d9faa846a9efa214a5 Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Fri, 10 Nov 2023 12:29:25 +0000 Subject: [PATCH] test(common): add forced utc times for tests --- tests/common.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/common.py b/tests/common.py index 97d0d7a..55b95a6 100644 --- a/tests/common.py +++ b/tests/common.py @@ -11,6 +11,10 @@ def five_minutes_into_future_naive(): return datetime.now() + timedelta(minutes=5) +def five_minutes_into_future_naive_utc(): + return datetime.utcnow() + timedelta(minutes=5) + + def five_minutes_into_future(): return datetime.now(timezone.utc) + timedelta(minutes=5) @@ -19,6 +23,10 @@ def five_minutes_into_past_naive(): return datetime.now() - timedelta(minutes=5) +def five_minutes_into_past_naive_utc(): + return datetime.utcnow() - timedelta(minutes=5) + + def five_minutes_into_past(): return datetime.now(timezone.utc) - timedelta(minutes=5)