mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
In the effort to reduce the number of database connections I introduced a small bug. This only affected the test templated letter flow, a None type error would happen when trying to creathe completed_at timestamp for a delivered message.
In the previous PR I removed the `update_notification` method to reduce the need for another update query. However, that meant the notification was marked as delivered without an updated_at timestamp. It is weird to set the updated_at when we create the notification. So is this a better fix? Or do I put the update back now? I recommend we push this fix now.
This commit is contained in:
@@ -245,6 +245,7 @@ def test_post_letter_notification_with_test_key_creates_pdf_and_sets_status_to_d
|
||||
fake_create_letter_task.assert_called_once_with([str(notification.id)], queue='research-mode-tasks')
|
||||
assert not fake_create_dvla_response_task.called
|
||||
assert notification.status == NOTIFICATION_DELIVERED
|
||||
assert notification.updated_at is not None
|
||||
|
||||
|
||||
@pytest.mark.parametrize('env', [
|
||||
|
||||
Reference in New Issue
Block a user