mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-16 07:33:16 +00:00
test(common): add forced utc times for tests
This commit is contained in:
parent
73a847f288
commit
4d893d56b2
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue