mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Append "Z" to DATETIME_FORMAT
We're formally using the ISO 8601 UTC datetime format, and so the
correct way to output the data is by appending the timezone.
("Z" in the case of UTC*).
Unfortunately, Python's `datetime` formatting will just ignore the
timezone part of the string on output, which means we just have to
append the string "Z" to the end of all datetime strings we output.
Should be fine, as we will only ever output UTC timestamps anyway.
* https://en.wikipedia.org/wiki/ISO_8601#UTC
This commit is contained in:
@@ -445,7 +445,7 @@ def test_send_user_reset_password_should_send_reset_password_link(notify_api,
|
||||
[str(current_app.config['NOTIFY_SERVICE_ID']),
|
||||
'some_uuid',
|
||||
app.encryption.encrypt(message),
|
||||
"2016-01-01T11:09:00.061258"],
|
||||
"2016-01-01T11:09:00.061258Z"],
|
||||
queue="notify")
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ def test_send_already_registered_email(notify_api, sample_user, already_register
|
||||
(str(current_app.config['NOTIFY_SERVICE_ID']),
|
||||
'some_uuid',
|
||||
app.encryption.encrypt(message),
|
||||
"2016-01-01T11:09:00.061258"),
|
||||
"2016-01-01T11:09:00.061258Z"),
|
||||
queue="notify")
|
||||
|
||||
|
||||
@@ -573,7 +573,7 @@ def test_send_user_confirm_new_email_returns_204(notify_api, sample_user, change
|
||||
str(current_app.config['NOTIFY_SERVICE_ID']),
|
||||
"some_uuid",
|
||||
app.encryption.encrypt(message),
|
||||
"2016-01-01T11:09:00.061258"), queue="notify")
|
||||
"2016-01-01T11:09:00.061258Z"), queue="notify")
|
||||
|
||||
|
||||
def test_send_user_confirm_new_email_returns_400_when_email_missing(notify_api, sample_user, mocker):
|
||||
|
||||
@@ -248,7 +248,7 @@ def test_send_user_sms_code(notify_api,
|
||||
([current_app.config['NOTIFY_SERVICE_ID'],
|
||||
"some_uuid",
|
||||
encrypted,
|
||||
"2016-01-01T11:09:00.061258"]),
|
||||
"2016-01-01T11:09:00.061258Z"]),
|
||||
queue="notify"
|
||||
)
|
||||
|
||||
@@ -288,7 +288,7 @@ def test_send_user_code_for_sms_with_optional_to_field(notify_api,
|
||||
([current_app.config['NOTIFY_SERVICE_ID'],
|
||||
"some_uuid",
|
||||
encrypted,
|
||||
"2016-01-01T11:09:00.061258"]),
|
||||
"2016-01-01T11:09:00.061258Z"]),
|
||||
queue="notify"
|
||||
)
|
||||
|
||||
@@ -343,7 +343,7 @@ def test_send_user_email_verification(notify_api,
|
||||
(str(current_app.config['NOTIFY_SERVICE_ID']),
|
||||
'some_uuid',
|
||||
encryption.encrypt(message),
|
||||
"2016-01-01T11:09:00.061258"),
|
||||
"2016-01-01T11:09:00.061258Z"),
|
||||
queue="notify")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user