Skip to content

Commit 61ac591

Browse files
committed
NRL-1472 add happy path scenarios with new valueset entries
1 parent 5f3f8d3 commit 61ac591

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

layer/nrlf/core/tests/test_validators.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,18 +1393,19 @@ def test_validate_content_invalid_content_type():
13931393

13941394

13951395
@pytest.mark.parametrize(
1396-
"format_code, format_display",
1396+
"content_type, format_code, format_display",
13971397
[
1398-
("urn:nhs-ic:record-contact", "Contact details (HTTP Unsecured)"),
1399-
("urn:nhs-ic:unstructured", "Unstructured Document"),
1400-
("urn:nhs-ic:structured", "Structured Document"),
1398+
("text/html", "urn:nhs-ic:record-contact", "Contact details (HTTP Unsecured)"),
1399+
("application/pdf", "urn:nhs-ic:unstructured", "Unstructured Document"),
1400+
("application/json+fhir", "urn:nhs-ic:structured", "Structured Document"),
14011401
],
14021402
)
1403-
def test_validate_nrl_format_code_valid_match(format_code, format_display):
1403+
def test_validate_nrl_format_code_valid_match(
1404+
content_type, format_code, format_display
1405+
):
14041406
validator = DocumentReferenceValidator()
14051407
document_ref_data = load_document_reference_json("Y05868-736253002-Valid")
1406-
if format_code == "urn:nhs-ic:record-contact":
1407-
document_ref_data["content"][0]["attachment"]["contentType"] = "text/html"
1408+
document_ref_data["content"][0]["attachment"]["contentType"] = content_type
14081409

14091410
document_ref_data["content"][0]["format"] = {
14101411
"system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",

0 commit comments

Comments
 (0)