mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -690,8 +690,8 @@ def test_should_show_updates_for_scheduled_job_as_json(
|
||||
service_one['id'],
|
||||
created_by=user_json(),
|
||||
job_id=fake_uuid,
|
||||
scheduled_for='2016-06-01T13:00:00',
|
||||
processing_started='2016-06-01T15:00:00',
|
||||
scheduled_for='2016-06-01T13:00:00+00:00',
|
||||
processing_started='2016-06-01T15:00:00+00:00',
|
||||
)})
|
||||
|
||||
response = logged_in_client.get(url_for('main.view_job_updates', service_id=service_one['id'], job_id=fake_uuid))
|
||||
|
||||
Reference in New Issue
Block a user