mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 17:38:02 -04:00
Merge pull request #3144 from alphagov/🚮-an-email
Stop emailing Notify when an MOU is signed
This commit is contained in:
@@ -178,7 +178,6 @@ class Config(object):
|
||||
MOU_SIGNER_RECEIPT_TEMPLATE_ID = '4fd2e43c-309b-4e50-8fb8-1955852d9d71'
|
||||
MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID = 'c20206d5-bf03-4002-9a90-37d5032d9e84'
|
||||
MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID = '522b6657-5ca5-4368-a294-6b527703bd0b'
|
||||
MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID = 'd0e66c4c-0c50-43f0-94f5-f85b613202d4'
|
||||
NOTIFY_INTERNATIONAL_SMS_SENDER = '07984404008'
|
||||
|
||||
BROKER_URL = 'sqs://'
|
||||
|
||||
@@ -208,13 +208,6 @@ def send_notifications_on_mou_signed(organisation_id):
|
||||
'on_behalf_of_name': organisation.agreement_signed_on_behalf_of_name
|
||||
}
|
||||
|
||||
# let notify team know something's happened
|
||||
_send_notification(
|
||||
current_app.config['MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID'],
|
||||
'notify-support+{}@digital.cabinet-office.gov.uk'.format(current_app.config['NOTIFY_ENVIRONMENT']),
|
||||
personalisation
|
||||
)
|
||||
|
||||
if not organisation.agreement_signed_on_behalf_of_email_address:
|
||||
signer_template_id = 'MOU_SIGNER_RECEIPT_TEMPLATE_ID'
|
||||
else:
|
||||
|
||||
@@ -795,7 +795,6 @@ def mou_signed_templates(notify_db, notify_db_session):
|
||||
'MOU_SIGNER_RECEIPT_TEMPLATE_ID',
|
||||
'MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID',
|
||||
'MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID',
|
||||
'MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID',
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -442,7 +442,6 @@ def test_post_update_organisation_set_mou_doesnt_email_if_no_signed_by(
|
||||
None,
|
||||
None,
|
||||
{
|
||||
'MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID': 'notify-support+test@digital.cabinet-office.gov.uk',
|
||||
'MOU_SIGNER_RECEIPT_TEMPLATE_ID': 'notify@digital.cabinet-office.gov.uk',
|
||||
}
|
||||
),
|
||||
@@ -450,7 +449,6 @@ def test_post_update_organisation_set_mou_doesnt_email_if_no_signed_by(
|
||||
'Important Person',
|
||||
'important@person.com',
|
||||
{
|
||||
'MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID': 'notify-support+test@digital.cabinet-office.gov.uk',
|
||||
'MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID': 'important@person.com',
|
||||
'MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID': 'notify@digital.cabinet-office.gov.uk',
|
||||
}
|
||||
|
||||
@@ -377,12 +377,10 @@ def test_update_should_update_a_template(client, sample_user):
|
||||
assert update_json_resp['data']['version'] == 2
|
||||
|
||||
assert update_json_resp['data']['created_by'] == str(sample_user.id)
|
||||
assert [
|
||||
template.created_by_id for template in TemplateHistory.query.all()
|
||||
] == [
|
||||
service.created_by.id,
|
||||
sample_user.id,
|
||||
]
|
||||
template_created_by_users = [template.created_by_id for template in TemplateHistory.query.all()]
|
||||
assert len(template_created_by_users) == 2
|
||||
assert service.created_by.id in template_created_by_users
|
||||
assert sample_user.id in template_created_by_users
|
||||
|
||||
|
||||
def test_should_be_able_to_archive_template(client, sample_template):
|
||||
|
||||
Reference in New Issue
Block a user