mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
Some minor refactoring.
- Updated notifications_dao.update_notification_status_by_id with an optional parameter to set the sent_by, this will eliminate a separate update to notifcaitons. - Added the callback url to the log message, that way we can see if it's the same url failing. - Stop sending the status callbacks for PENDING status.
This commit is contained in:
@@ -89,6 +89,13 @@ def test_process_sms_response_return_success_for_send_sms_code_reference(mocker)
|
||||
assert error is None
|
||||
|
||||
|
||||
def test_process_sms_response_does_not_send_status_update_for_pending(sample_notification, mocker):
|
||||
send_mock = mocker.patch('app.celery.service_callback_tasks.send_delivery_status_to_service.apply_async')
|
||||
process_sms_client_response(
|
||||
status='2', provider_reference=str(sample_notification.id), client_name='firetext')
|
||||
send_mock.assert_not_called()
|
||||
|
||||
|
||||
def test_process_sms_updates_sent_by_with_client_name_if_not_in_noti(notify_db, sample_notification):
|
||||
sample_notification.sent_by = None
|
||||
success, error = process_sms_client_response(
|
||||
|
||||
Reference in New Issue
Block a user