Purge noti to email reply to older than 7 days

This commit is contained in:
Ken Tsang
2017-10-09 14:51:27 +01:00
parent 26d84a873e
commit 2c46f201b5
4 changed files with 92 additions and 21 deletions

View File

@@ -126,9 +126,13 @@ def test_should_call_delete_sms_notifications_more_than_week_in_task(notify_api,
def test_should_call_delete_email_notifications_more_than_week_in_task(notify_api, mocker):
mocked = mocker.patch('app.celery.scheduled_tasks.delete_notifications_created_more_than_a_week_ago_by_type')
mocked_delete_noti_to_reply_to = mocker.patch(
'app.celery.scheduled_tasks.delete_notification_to_email_reply_to_more_than_a_week_ago')
mocked_notifications = mocker.patch(
'app.celery.scheduled_tasks.delete_notifications_created_more_than_a_week_ago_by_type')
delete_email_notifications_older_than_seven_days()
mocked.assert_called_once_with('email')
mocked_delete_noti_to_reply_to.assert_called_once_with()
mocked_notifications.assert_called_once_with('email')
def test_should_call_delete_letter_notifications_more_than_week_in_task(notify_api, mocker):