Skip to content

Commit

Permalink
DTOSS-6542 - update tests with new routing plan
Browse files Browse the repository at this point in the history
  • Loading branch information
dnimmo committed Jan 21, 2025
1 parent ce62f36 commit 2fd54f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/pacts/processpilotdatafunction-notifyfunction.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"method": "post",
"path": "/api/notify/send",
"body": {
"routing_plan": "breast-screening-pilot",
"routing_plan": "breast-screening-pilot-with-letters",
"recipients": [
{
"nhs_number": "1234567890",
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/notify/test_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_send_messages_success(mocker):
send_message_mock = mocker.patch("notifier.send_message", return_value="OK")

data = {
"routing_plan": "breast-screening-pilot",
"routing_plan": "breast-screening-pilot-with-letters",
"recipients": [
{"nhs_number": "0000000000"},
{"nhs_number": "0000000001"},
Expand All @@ -87,13 +87,13 @@ def test_send_messages_success(mocker):

send_message_mock.assert_any_call(
"an_access_token",
routing_plans.get_id("breast-screening-pilot"),
routing_plans.get_id("breast-screening-pilot-with-letters"),
{"nhs_number": "0000000000"},
expected_batch_id,
)
send_message_mock.assert_any_call(
"an_access_token",
routing_plans.get_id("breast-screening-pilot"),
routing_plans.get_id("breast-screening-pilot-with-letters"),
{"nhs_number": "0000000001"},
expected_batch_id,
)
Expand All @@ -113,7 +113,7 @@ def side_effect(*args, **kwargs):
send_message_mock.side_effect = side_effect

data = {
"routing_plan": "breast-screening-pilot",
"routing_plan": "breast-screening-pilot-with-letters",
"recipients": [
{"nhs_number": "0000000000"},
{"nhs_number": "0000000001"},
Expand All @@ -132,7 +132,7 @@ def test_send_message_success(mocker, setup, message_data, response_text):
message_reference = "da0b1495-c7cb-468c-9d81-07dee089d728"
mocker.patch("uuid_generator.uuid4_str", return_value=message_reference)
access_token = "access_token"
routing_plan = "breast-screening-pilot"
routing_plan = "breast-screening-pilot-with-letters"
routing_plan_id = routing_plans.get_id(routing_plan)
message_data["routing_plan"] = routing_plan
batch_id = uuid_generator.reference_uuid(json.dumps(message_data))
Expand All @@ -159,7 +159,7 @@ def test_send_message_logs_error(mocker, setup, error_response_text, message_dat
"""Test logging and handling of error responses during message sending."""
mock_recorder = mocker.patch("batch_message_recorder.save_status")
access_token = "access_token"
routing_plan = "breast-screening-pilot"
routing_plan = "breast-screening-pilot-with-letters"
routing_plan_id = routing_plans.get_id(routing_plan)
batch_id = uuid_generator.reference_uuid(json.dumps(message_data))
message_reference = "da0b1495-c7cb-468c-9d81-07dee089d728"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/process_pilot_data/test_data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_process_data_valid_csv(setup):
]

expected_request_body = {
"routing_plan": "breast-screening-pilot",
"routing_plan": "breast-screening-pilot-with-letters",
"recipients": [
{
"nhs_number": "0000000000",
Expand Down

0 comments on commit 2fd54f8

Please sign in to comment.