Ensure test data uses timezone aware timestamps

This reflects what the API sends us, and means we have to do less
timezone-wrangling.
This commit is contained in:
Chris Hill-Scott
2020-10-06 11:34:08 +01:00
parent 5c2469b24e
commit 9c5dceaf81
2 changed files with 3 additions and 3 deletions

View File

@@ -822,7 +822,7 @@ def format_thousands(value):
def is_less_than_days_ago(date_from_db, number_of_days):
return (
datetime.utcnow().astimezone(pytz.utc) - parser.parse(date_from_db).astimezone(pytz.utc)
datetime.utcnow().astimezone(pytz.utc) - parser.parse(date_from_db)
).days < number_of_days