Skip to content

Commit d5e9822

Browse files
committed
use contains
1 parent baffabf commit d5e9822

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

features/eps_fhir/validator.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Feature: I can call the validator endpoint
2020
When I make a invalid request to the eps_fhir validator endpoint with show validation set to false
2121
Then the response indicates a bad request
2222
And the validator response has many error issue
23-
And the validator response has error with diagnostic HAPI-1861: Failed to parse JSON encoded FHIR content: HAPI-1859: Content does not appear to be FHIR JSON, first non-whitespace character was: '\"' (must be '{')
23+
And the validator response has error with diagnostic containing HAPI-1861

features/eps_fhir_dispensing/validator.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Feature: I can call the validator endpoint
2020
When I make a invalid request to the eps_fhir validator endpoint with show validation set to false
2121
Then the response indicates a bad request
2222
And the validator response has many error issue
23-
And the validator response has error with diagnostic HAPI-1861: Failed to parse JSON encoded FHIR content: HAPI-1859: Content does not appear to be FHIR JSON, first non-whitespace character was: '\"' (must be '{')
23+
And the validator response has error with diagnostic containing HAPI-1861

features/eps_fhir_prescribing/validator.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Feature: I can call the validator endpoint
2020
When I make a invalid request to the eps_fhir validator endpoint with show validation set to false
2121
Then the response indicates a bad request
2222
And the validator response has many error issue
23-
And the validator response has error with diagnostic HAPI-1861: Failed to parse JSON encoded FHIR content: HAPI-1859: Content does not appear to be FHIR JSON, first non-whitespace character was: '\"' (must be '{')
23+
And the validator response has error with diagnostic containing HAPI-1861

features/steps/eps_api_steps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ def validator_response_has_n_issues_of_type(context, expected_issue_count, issue
216216
assert_that(int(expected_issue_count)).is_equal_to(actual_issue_count)
217217

218218

219-
@then("the validator response has error with diagnostic {diagnostic}")
219+
@then("the validator response has error with diagnostic containing {diagnostic}")
220220
def validator_response_has_error_issue_with_diagnostic(context, diagnostic):
221221
json_response = json.loads(context.response.content)
222222
assert_that(json_response["resourceType"]).is_equal_to("OperationOutcome")
223223
actual_issue_count = sum(
224-
p["severity"] == "error" and p["diagnostics"] == diagnostic
224+
p["severity"] == "error" and diagnostic in p["diagnostics"]
225225
for p in json_response["issue"]
226226
)
227227
assert_that(actual_issue_count).is_equal_to(1)

0 commit comments

Comments
 (0)