From 19bf68b567bf3ee1dde96c097c7c9d623ddf87d4 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Mon, 16 Mar 2020 15:50:00 +0000 Subject: [PATCH] Delete unused function --- app/notifications/process_client_response.py | 5 ----- tests/app/notifications/test_process_client_response.py | 8 -------- 2 files changed, 13 deletions(-) diff --git a/app/notifications/process_client_response.py b/app/notifications/process_client_response.py index e1cf20edc..b2a73f203 100644 --- a/app/notifications/process_client_response.py +++ b/app/notifications/process_client_response.py @@ -117,8 +117,3 @@ def _process_for_status(notification_status, client_name, provider_reference): success = "{} callback succeeded. reference {} updated".format(client_name, provider_reference) return success - - -def set_notification_sent_by(notification, client_name): - notification.sent_by = client_name - dao_update_notification(notification) diff --git a/tests/app/notifications/test_process_client_response.py b/tests/app/notifications/test_process_client_response.py index d4f16750a..856cef931 100644 --- a/tests/app/notifications/test_process_client_response.py +++ b/tests/app/notifications/test_process_client_response.py @@ -114,14 +114,6 @@ def test_process_sms_updates_billable_units_if_zero(sample_notification): assert sample_notification.billable_units == 1 -def test_process_sms_does_not_update_sent_by_if_already_set(mocker, sample_notification): - mock_update = mocker.patch('app.notifications.process_client_response.set_notification_sent_by') - sample_notification.sent_by = 'MMG' - process_sms_client_response( - status='3', provider_reference=str(sample_notification.id), client_name='MMG') - assert not mock_update.called - - def test_process_sms_response_returns_error_bad_reference(mocker): success, error = process_sms_client_response( status='000', provider_reference='something-bad', client_name='sms-client')