File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def get_consent() -> Union[dict, tuple]:
125125 Returns:
126126 Union[dict, tuple]: Response for GET /Consent
127127 """
128- get_consent_response ()
128+ return get_consent_response ()
129129
130130@app .route (f"/{ COMMON_PATH } /Consent" , methods = ["POST" ])
131131def post_consent () -> Union [dict , tuple ]:
Original file line number Diff line number Diff line change 2121
2222UTILS_FILE_PATH = "sandbox.api.utils"
2323APP_FILE_PATH = "sandbox.api.app"
24- CONSENT_FILE_PATH = "sandbox.api.get_consent"
24+ GET_CONSENT_FILE_PATH = "sandbox.api.get_consent"
2525
2626
2727@pytest .mark .parametrize ("endpoint" , ["/_status" , "/_ping" , "/health" ])
@@ -164,7 +164,7 @@ def test_questionnaire_response(
164164 ),
165165 ],
166166)
167- @patch (f"{ APP_FILE_PATH } .generate_response_from_example" )
167+ @patch (f"{ GET_CONSENT_FILE_PATH } .generate_response_from_example" )
168168def test_get_consent (
169169 mock_generate_response_from_example : MagicMock ,
170170 request_args : str ,
@@ -242,8 +242,8 @@ def test_post_consent_when_valid_returns_success(
242242 assert response .json == loads (mocked_response .get_data (as_text = True ))
243243
244244
245- @patch (f"{ CONSENT_FILE_PATH } .remove_system" )
246- @patch (f"{ CONSENT_FILE_PATH } .generate_response_from_example" )
245+ @patch (f"{ GET_CONSENT_FILE_PATH } .remove_system" )
246+ @patch (f"{ GET_CONSENT_FILE_PATH } .generate_response_from_example" )
247247def test_consent__500_internal_server_error (
248248 mock_generate_response_from_example : MagicMock ,
249249 mock_remove_system : MagicMock ,
Original file line number Diff line number Diff line change 2020 INTERNAL_SERVER_ERROR_EXAMPLE ,
2121 GET_CONSENT__STATUS_PARAM_INVALID ,
2222 BAD_REQUEST_INCLUDE_PARAM_INVALID ,
23- CONSENT__STATUS_PARAM_INVALID ,
2423)
2524
2625FHIR_MIMETYPE = "application/fhir+json"
@@ -63,7 +62,7 @@ def check_for_related_person_errors(request: Request) -> Optional[tuple]:
6362
6463
6564def check_for_consent_errors (request : Request ) -> Optional [tuple ]:
66- """Check for errors in the request headers and arguments for a Get /Consent
65+ """Check for errors in the request headers and arguments for a GET /Consent request
6766
6867 Args:
6968 request (Request): Flask request object
You can’t perform that action at this time.
0 commit comments