Skip to content

Commit 023781c

Browse files
committed
NPA-4474 Fix Rebase
1 parent 17bcce0 commit 023781c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

sandbox/api/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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"])
131131
def post_consent() -> Union[dict, tuple]:

sandbox/api/tests/test_app.py

Lines changed: 4 additions & 4 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-
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")
168168
def 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")
247247
def test_consent__500_internal_server_error(
248248
mock_generate_response_from_example: MagicMock,
249249
mock_remove_system: MagicMock,

sandbox/api/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
INTERNAL_SERVER_ERROR_EXAMPLE,
2121
GET_CONSENT__STATUS_PARAM_INVALID,
2222
BAD_REQUEST_INCLUDE_PARAM_INVALID,
23-
CONSENT__STATUS_PARAM_INVALID,
2423
)
2524

2625
FHIR_MIMETYPE = "application/fhir+json"
@@ -63,7 +62,7 @@ def check_for_related_person_errors(request: Request) -> Optional[tuple]:
6362

6463

6564
def 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

0 commit comments

Comments
 (0)