Skip to content

Commit 4abb3e3

Browse files
committed
NRL-1076 fix tests
1 parent d946923 commit 4abb3e3

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

api/consumer/searchDocumentReference/tests/test_search_document_reference_consumer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ def test_search_document_reference_accession_number_in_pointer(
9292
"resourceType": "Bundle",
9393
"type": "searchset",
9494
"total": 1,
95+
"link": [
96+
{
97+
"relation": "self",
98+
"url": "https://pytest.api.service.nhs.uk/record-locator/consumer/FHIR/R4/DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|6700028191",
99+
}
100+
],
95101
"entry": [{"resource": doc_ref.model_dump(exclude_none=True)}],
96102
}
97103

@@ -495,7 +501,7 @@ def test_search_document_reference_invalid_type(repository: DocumentPointerRepos
495501
}
496502
]
497503
},
498-
"diagnostics": "Invalid query parameter (The provided type system does not match the allowed types for this organisation)",
504+
"diagnostics": "Invalid query parameter (The provided type does not match the allowed types for this organisation)",
499505
"expression": ["type"],
500506
}
501507
],

api/consumer/searchPostDocumentReference/tests/test_search_post_document_reference_consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def test_search_post_document_reference_invalid_type(
424424
}
425425
]
426426
},
427-
"diagnostics": "Invalid type (The provided type system does not match the allowed types for this organisation)",
427+
"diagnostics": "Invalid type (The provided type does not match the allowed types for this organisation)",
428428
"expression": ["type"],
429429
}
430430
],

api/producer/searchDocumentReference/tests/test_search_document_reference_producer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_search_document_reference_invalid_type(repository: DocumentPointerRepos
201201
}
202202
]
203203
},
204-
"diagnostics": "Invalid query parameter (The provided type system does not match the allowed types for this organisation)",
204+
"diagnostics": "Invalid query parameter (The provided type does not match the allowed types for this organisation)",
205205
"expression": ["type"],
206206
}
207207
],

api/producer/searchPostDocumentReference/tests/test_search_post_document_reference_producer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def test_search_document_reference_invalid_type(repository: DocumentPointerRepos
206206
}
207207
]
208208
},
209-
"diagnostics": "The provided type system does not match the allowed types for this organisation",
209+
"diagnostics": "The provided type does not match the allowed types for this organisation",
210210
"expression": ["type"],
211211
}
212212
],

layer/nrlf/core/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
def validate_type(type_: Optional[RequestQueryType], pointer_types: List[str]) -> bool:
2828
"""
29-
Validates if the given type system is present in the list of pointer types.
29+
Validates if the given type is present in the list of pointer types.
3030
"""
3131
if not type_:
3232
return True

0 commit comments

Comments
 (0)