Skip to content

Commit d11cf68

Browse files
committed
[NDR-423] PR changes
1 parent 5d839c5 commit d11cf68

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lambdas/handlers/get_fhir_document_reference_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def extract_document_parameters(event):
9191
document_id = get_id_from_path_parameters(path_params)
9292

9393
if not document_id:
94-
logger.error("Missing document id or snomed code in request path parameters.")
94+
logger.error("Missing document id in request path parameters.")
9595
raise GetFhirDocumentReferenceException(
9696
400,
9797
LambdaError.DocumentReferenceMissingParameters,

lambdas/tests/unit/services/test_pdm_get_fhir_document_reference_by_id_service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ def test_get_dynamo_table_for_unsupported_doc_type(patched_service):
6868

6969
non_lg_code = SnomedCode(code="non-lg-code", display_name="Non Lloyd George")
7070

71-
with pytest.raises(InvalidDocTypeException) as excinfo:
71+
with pytest.raises(InvalidDocTypeException) as exc_info:
7272
patched_service._get_dynamo_table_for_doc_type(non_lg_code)
7373

74-
assert excinfo.value.status_code == 400
75-
assert excinfo.value.error == LambdaError.DocTypeDB
74+
assert exc_info.value.status_code == 400
75+
assert exc_info.value.error == LambdaError.DocTypeDB
7676

7777

7878
# Not PDM however the code that this relates to was introduced because of PDM
@@ -89,10 +89,10 @@ def test_get_document_references_empty_result(patched_service):
8989
# Test when no documents are found
9090
patched_service.document_service.get_item.return_value = None
9191

92-
with pytest.raises(GetFhirDocumentReferenceException) as excinfo:
92+
with pytest.raises(GetFhirDocumentReferenceException) as exc_info:
9393
patched_service.get_core_document_references(
9494
document_id="test-id",
9595
table=MOCK_PDM_TABLE_NAME,
9696
)
97-
assert excinfo.value.status_code == 404
98-
assert excinfo.value.error == LambdaError.DocumentReferenceNotFound
97+
assert exc_info.value.status_code == 404
98+
assert exc_info.value.error == LambdaError.DocumentReferenceNotFound

0 commit comments

Comments
 (0)