Merge branch 'main' into stvnrlly-timezones

This commit is contained in:
stvnrlly
2022-11-28 16:21:43 -05:00
12 changed files with 73 additions and 133 deletions

View File

@@ -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 30 December at 7:00pm'
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'

View File

@@ -183,7 +183,8 @@ def test_message_status_page_contains_message_status_ids(client_request):
# so this test ensures we don't accidentally remove them
page = client_request.get('main.message_status')
assert page.find(id='email-statuses')
# email-statuses is commented out in view
# assert page.find(id='email-statuses')
assert page.find(id='text-message-statuses')

View File

@@ -253,7 +253,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, 12, 0, 0), datetime(2020, 1, 9, 6, 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