diff --git a/tests/app/main/views/test_api_integration.py b/tests/app/main/views/test_api_integration.py index d52eea3cf..3f3ef5ef1 100644 --- a/tests/app/main/views/test_api_integration.py +++ b/tests/app/main/views/test_api_integration.py @@ -1,10 +1,12 @@ import uuid from collections import OrderedDict +from datetime import date from unittest.mock import call import pytest from flask import url_for +from app.formatters import format_datetime_short from tests import sample_uuid, validate_route_permission from tests.conftest import ( SERVICE_ONE_ID, @@ -195,7 +197,7 @@ def test_should_show_api_keys_page( revoke_link = page.select_one('main tr a.govuk-link.govuk-link--destructive') assert rows[0] == 'API keys Action' - assert rows[1] == 'another key name Revoked 1 January at 1:00am' + assert rows[1] == f"another key name Revoked {format_datetime_short(date.fromtimestamp(0).isoformat())}" assert rows[2] == 'some key name Revoke some key name' assert normalize_spaces(revoke_link.text) == 'Revoke some key name' diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index 0420bd38f..8899de1e9 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -259,7 +259,7 @@ def test_should_show_job_with_sending_limit_exceeded_status( 'No messages to show yet…' )), # Created a while ago, started just within the last 24h - (datetime(2020, 1, 1, 0, 0, 0), datetime(2020, 1, 9, 1, 0, 1), ( + (datetime(2020, 1, 1, 0, 0, 0), datetime(2020, 1, 9, 6, 0, 1), ( 'No messages to show yet…' )), # Created a while ago, started exactly 24h ago