Update the timeout notifications to use technical-failure rather than temporary failure

This commit is contained in:
Rebecca Law
2016-12-14 16:18:43 +00:00
parent f91a2b67f1
commit a6da1ac864
3 changed files with 11 additions and 10 deletions

View File

@@ -67,7 +67,7 @@ def test_update_status_of_notifications_after_timeout(notify_api,
created_at=datetime.utcnow() - timedelta(
seconds=current_app.config.get('SENDING_NOTIFICATIONS_TIMEOUT_PERIOD') + 10))
timeout_notifications()
assert not1.status == 'temporary-failure'
assert not1.status == 'technical-failure'
def test_not_update_status_of_notification_before_timeout(notify_api,

View File

@@ -960,13 +960,13 @@ def test_dao_timeout_notifications(notify_db, notify_db_session, ):
assert Notification.query.get(pending.id).status == 'pending'
assert Notification.query.get(delivered.id).status == 'delivered'
updated = dao_timeout_notifications(1)
assert Notification.query.get(created.id).status == 'temporary-failure'
assert Notification.query.get(sending.id).status == 'temporary-failure'
assert Notification.query.get(pending.id).status == 'temporary-failure'
assert Notification.query.get(created.id).status == 'technical-failure'
assert Notification.query.get(sending.id).status == 'technical-failure'
assert Notification.query.get(pending.id).status == 'technical-failure'
assert Notification.query.get(delivered.id).status == 'delivered'
assert NotificationHistory.query.get(created.id).status == 'temporary-failure'
assert NotificationHistory.query.get(sending.id).status == 'temporary-failure'
assert NotificationHistory.query.get(pending.id).status == 'temporary-failure'
assert NotificationHistory.query.get(created.id).status == 'technical-failure'
assert NotificationHistory.query.get(sending.id).status == 'technical-failure'
assert NotificationHistory.query.get(pending.id).status == 'technical-failure'
assert NotificationHistory.query.get(delivered.id).status == 'delivered'
assert updated == 3