File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1212
1313UTILS_FILE_PATH = "sandbox.api.utils"
1414APP_FILE_PATH = "sandbox.api.app"
15-
15+ CONSENT_FILE_PATH = "sandbox.api.get_consent"
1616
1717@pytest .mark .parametrize ("endpoint" , ["/_status" , "/_ping" , "/health" ])
1818def test_health_check (client : object , endpoint : str ) -> None :
@@ -154,7 +154,7 @@ def test_questionnaire_response(
154154 ),
155155 ],
156156)
157- @patch (f"{ APP_FILE_PATH } .generate_response_from_example" )
157+ @patch (f"{ CONSENT_FILE_PATH } .generate_response_from_example" )
158158def test_consent (
159159 mock_generate_response_from_example : MagicMock ,
160160 request_args : str ,
@@ -176,8 +176,8 @@ def test_consent(
176176 assert response .json == loads (mocked_response .get_data (as_text = True ))
177177
178178
179- @patch (f"{ APP_FILE_PATH } .remove_system" )
180- @patch (f"{ APP_FILE_PATH } .generate_response_from_example" )
179+ @patch (f"{ CONSENT_FILE_PATH } .remove_system" )
180+ @patch (f"{ CONSENT_FILE_PATH } .generate_response_from_example" )
181181def test_consent__500_internal_server_error (
182182 mock_generate_response_from_example : MagicMock ,
183183 mock_remove_system : MagicMock ,
Original file line number Diff line number Diff line change 88from .conftest import CONSENT_API_ENDPOINT , RELATED_PERSON_API_ENDPOINT
99
1010FILE_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" ,
@@ -221,7 +220,7 @@ def test_check_for_related_person_errors(
221220 ),
222221 ],
223222)
224- @patch (f"{ GET_CONSENT_FILE_PATH } .generate_response_from_example" )
223+ @patch (f"{ FILE_PATH } .generate_response_from_example" )
225224def test_check_for_consent_errors (
226225 mock_generate_response_from_example : MagicMock ,
227226 request_args : str ,
You can’t perform that action at this time.
0 commit comments