fix tests

This commit is contained in:
Kenneth Kehl
2024-08-20 07:38:59 -07:00
parent 19ae20a0d4
commit 6e22cf101e

View File

@@ -80,6 +80,7 @@ def test_should_send_personalised_template_to_correct_sms_provider_and_persist(
db_notification = create_notification(
template=sample_sms_template_with_html,
personalisation={},
job_id="myjobid",
status=NotificationStatus.CREATED,
reply_to_text=sample_sms_template_with_html.service.get_default_sms_sender(),
)
@@ -223,6 +224,7 @@ def test_send_sms_should_use_template_version_from_notification_not_latest(
status=NotificationStatus.CREATED,
reply_to_text=sample_template.service.get_default_sms_sender(),
normalised_to="2028675309",
job_id="myjobid",
)
mock_s3 = mocker.patch("app.delivery.send_to_providers.get_phone_number_from_s3")
@@ -692,6 +694,7 @@ def test_should_send_sms_to_international_providers(
notification_international = create_notification(
template=sample_template,
to_field="+6011-17224412",
job_id="myjobid",
personalisation={"name": "Jo"},
status=NotificationStatus.CREATED,
international=True,
@@ -801,6 +804,7 @@ def test_send_sms_to_provider_should_use_normalised_to(mocker, client, sample_te
send_mock = mocker.patch("app.aws_sns_client.send_sms")
notification = create_notification(
template=sample_template,
job_id="myjobid",
to_field="+12028675309",
normalised_to="2028675309",
reply_to_text="testing",
@@ -881,6 +885,7 @@ def test_send_sms_to_provider_should_return_template_if_found_in_redis(
send_mock = mocker.patch("app.aws_sns_client.send_sms")
notification = create_notification(
template=sample_template,
job_id="myjobid",
to_field="+447700900855",
normalised_to="447700900855",
reply_to_text="testing",