Skip to content

Commit 87b95a2

Browse files
committed
refactor: formatting updates
1 parent eee3756 commit 87b95a2

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

sandbox/api/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def get_consent() -> Union[dict, tuple]:
182182
elif performer_identifier == "9000000025":
183183
return generate_response_from_example(CONSENT__NO_RELATIONSHIPS, 200)
184184
else:
185-
logger.error(f"Performer identifier does not match examples")
185+
logger.error("Performer identifier does not match examples")
186186
return generate_response_from_example(NOT_FOUND, 404)
187187

188188
except Exception as e:

sandbox/api/tests/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def test_consent__404_bad_request(
275275
client: object,
276276
) -> None:
277277
"""Test Consent endpoint."""
278-
mock_generate_response_from_example.return_value = mocked_response = Response(
278+
mock_generate_response_from_example.return_value = Response(
279279
dumps({"data": "mocked"}), status=404, content_type="application/json"
280280
)
281281
# Act

sandbox/api/tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_check_for_errors(
5252
status_code: int,
5353
client: object,
5454
) -> None:
55-
mock_generate_response_from_example.return_value = mocked_response = Response(
55+
mock_generate_response_from_example.return_value = Response(
5656
dumps({"data": "mocked"}), status=status_code, content_type="application/json"
5757
)
5858
# Act

sandbox/api/utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ def check_for_consent_include_params(
194194
Args:
195195
_include (str): The include parameter supplied to the request
196196
logger (logging.Logger): Logger instance to use for error logging
197-
include_none_response_yaml (str): The file to return when include params are empty
198-
include_both_response_yaml (str): The file to return when include param matches with Consent:performer,Consent:patient
199-
include_patient_response_yaml (str): (optional) The file to return when include param matches with Consent:patient
200-
include_performer_response_yaml (str): (optional) The response to return when include param matches with Consent:performer
197+
include_none_response_yaml (str): Bundle to return when include params are empty
198+
include_both_response_yaml (str): Bundle to return when include param is Consent:performer,Consent:patient
199+
include_patient_response_yaml (str): (optional) Bundle to return when include param is Consent:patient
200+
include_performer_response_yaml (str): (optional) Bundle to return when include param is Consent:performer
201201
202202
Returns:
203203
response: Resultant Response object based on input.
@@ -207,7 +207,7 @@ def check_for_consent_include_params(
207207
and _include != CONSENT_PATIENT
208208
and _include != f"{CONSENT_PATIENT},{CONSENT_PERFORMER}"
209209
and _include != f"{CONSENT_PERFORMER},{CONSENT_PATIENT}"
210-
and _include != None
210+
and _include is not None
211211
):
212212
return generate_response_from_example(BAD_REQUEST_INCLUDE_PARAM_INVALID, 400)
213213
elif _include == CONSENT_PERFORMER:
@@ -241,9 +241,9 @@ def check_for_consent_filtering_params(
241241
242242
Args:
243243
status (str): The status parameter supplied to the request
244-
status_active_response_yaml (str): The file to return when status param matches with 'active'
245-
status_inactive_response_yaml (str): The response to return when status param matches with 'inactive'
246-
status_proposed_and_active_response_yaml (str): The file to return when status param matches with 'proposed,inactive'
244+
status_active_response_yaml (str): Bundle to return when status param is 'active'
245+
status_inactive_response_yaml (str): Bundle to return when status param is 'inactive'
246+
status_proposed_and_active_response_yaml (str): Bundle to return when status param is 'proposed,inactive'
247247
248248
Returns:
249249
response: Resultant Response object based on input.

0 commit comments

Comments
 (0)