Skip to content

Commit 65d8e57

Browse files
committed
NPA-4474 Fix Unit Tests
1 parent 5ad1474 commit 65d8e57

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

sandbox/api/tests/test_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
UTILS_FILE_PATH = "sandbox.api.utils"
2323
APP_FILE_PATH = "sandbox.api.app"
24-
24+
CONSENT_FILE_PATH = "sandbox.api.get_consent"
2525

2626
@pytest.mark.parametrize("endpoint", ["/_status", "/_ping", "/health"])
2727
def test_health_check(client: object, endpoint: str) -> None:
@@ -241,8 +241,8 @@ def test_post_consent_when_valid_returns_success(
241241
assert response.json == loads(mocked_response.get_data(as_text=True))
242242

243243

244-
@patch(f"{APP_FILE_PATH}.remove_system")
245-
@patch(f"{APP_FILE_PATH}.generate_response_from_example")
244+
@patch(f"{CONSENT_FILE_PATH}.remove_system")
245+
@patch(f"{CONSENT_FILE_PATH}.generate_response_from_example")
246246
def test_consent__500_internal_server_error(
247247
mock_generate_response_from_example: MagicMock,
248248
mock_remove_system: MagicMock,

sandbox/api/tests/test_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from .conftest import CONSENT_API_ENDPOINT, RELATED_PERSON_API_ENDPOINT
99

1010
FILE_PATH = "sandbox.api.utils"
11-
GET_CONSENT_FILE_PATH = "sandbox.api.get_consent"
1211

1312
@pytest.mark.parametrize(
1413
"request_args,response_file_name,status_code",
@@ -219,7 +218,7 @@ def test_check_for_related_person_errors(
219218
),
220219
],
221220
)
222-
@patch(f"{GET_CONSENT_FILE_PATH}.generate_response_from_example")
221+
@patch(f"{FILE_PATH}.generate_response_from_example")
223222
def test_check_for_consent_errors(
224223
mock_generate_response_from_example: MagicMock,
225224
request_args: str,

0 commit comments

Comments
 (0)