notify-api-742 don't write phone numbers to db

This commit is contained in:
Kenneth Kehl
2024-01-16 11:21:24 -08:00
parent 5af876a963
commit f9f1013f5b
16 changed files with 124 additions and 76 deletions

View File

@@ -289,7 +289,7 @@ def test_get_all_notifications_except_job_notifications_returns_200(
"uri": notification.template.get_link(),
"version": 1,
}
assert json_response["notifications"][0]["phone_number"] == "+447700900855"
assert json_response["notifications"][0]["phone_number"] == "1"
assert json_response["notifications"][0]["type"] == "sms"
assert not json_response["notifications"][0]["scheduled_for"]
@@ -322,7 +322,7 @@ def test_get_all_notifications_with_include_jobs_arg_returns_200(
assert json_response["notifications"][0]["id"] == str(notification.id)
assert json_response["notifications"][0]["status"] == notification.status
assert json_response["notifications"][0]["phone_number"] == notification.to
assert "1" == notification.to
assert (
json_response["notifications"][0]["type"] == notification.template.template_type
)
@@ -381,7 +381,7 @@ def test_get_all_notifications_filter_by_template_type(client, sample_service):
"uri": notification.template.get_link(),
"version": 1,
}
assert json_response["notifications"][0]["email_address"] == "don.draper@scdp.biz"
assert json_response["notifications"][0]["email_address"] == "1"
assert json_response["notifications"][0]["type"] == "email"

View File

@@ -838,7 +838,7 @@ def test_post_sms_should_persist_supplied_sms_number(
notifications = Notification.query.all()
assert len(notifications) == 1
notification_id = notifications[0].id
assert "+(44) 77009-00855" == notifications[0].to
assert "1" == notifications[0].to
assert resp_json["id"] == str(notification_id)
assert mocked.called