mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05:00
Fixed bug with deleting the 'delivered' notifications.
This commit is contained in:
@@ -45,14 +45,16 @@ mmg_error = {'Error': '40', 'Description': 'error'}
|
||||
|
||||
|
||||
def test_should_call_delete_notifications_more_than_week_in_task(notify_api, mocker):
|
||||
mocker.patch('app.celery.tasks.delete_notifications_created_more_than_a_week_ago')
|
||||
mocked = mocker.patch('app.celery.tasks.delete_notifications_created_more_than_a_week_ago')
|
||||
delete_successful_notifications()
|
||||
assert mocked.assert_called_with('delivered')
|
||||
assert tasks.delete_notifications_created_more_than_a_week_ago.call_count == 1
|
||||
|
||||
|
||||
def test_should_call_delete_notifications_more_than_week_in_task(notify_api, mocker):
|
||||
mocker.patch('app.celery.tasks.delete_notifications_created_more_than_a_week_ago')
|
||||
mocked = mocker.patch('app.celery.tasks.delete_notifications_created_more_than_a_week_ago')
|
||||
delete_failed_notifications()
|
||||
mocked.assert_called_with('failed')
|
||||
assert tasks.delete_notifications_created_more_than_a_week_ago.call_count == 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user