mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-17 04:58:50 -04:00
If the service is inactive at the time of sending the notification to the provider, the notification is marked as technical-failure.
Removed the /service/<id>/deactivate endpoint, now using /service/<id>/archive
This commit is contained in:
@@ -121,13 +121,14 @@ def test_should_send_personalised_template_to_correct_email_provider_and_persist
|
||||
["app.aws_ses_client.send_email",
|
||||
"app.mmg_client.send_sms",
|
||||
"app.firetext_client.send_sms"])
|
||||
def test_should_not_send_message_when_service_is_inactive(sample_service, sample_notification, mocker,
|
||||
client_send):
|
||||
def test_should_not_send_message_when_service_is_inactive_notiifcation_is_in_tech_failure(
|
||||
sample_service, sample_notification, mocker, client_send):
|
||||
sample_service.active = False
|
||||
send_to_providers.send_email_to_provider(sample_notification)
|
||||
send_mock = mocker.patch(client_send, return_value='reference')
|
||||
|
||||
send_to_providers.send_email_to_provider(sample_notification)
|
||||
send_mock.assert_not_called()
|
||||
assert Notification.query.get(sample_notification.id).status == 'technical-failure'
|
||||
|
||||
|
||||
def test_send_sms_should_use_template_version_from_notification_not_latest(
|
||||
|
||||
Reference in New Issue
Block a user