Skip to content

Commit e2ff01b

Browse files
committed
NPA-4513 Update Sandbox Scenarios
1 parent a93e8a3 commit e2ff01b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sandbox/api/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def post_consent() -> Union[dict, tuple]:
150150

151151
# Invalid access level
152152
elif patient_identifier == "9000000025":
153-
response = generate_response_from_example(POST_CONSENT__INVALID_ACCESS_LEVEL_ERROR, 400)
153+
response = generate_response_from_example(POST_CONSENT__INVALID_ACCESS_LEVEL_ERROR, 403)
154154

155155
# Missing required evidence
156156
elif patient_identifier == "9000000033":

sandbox/api/tests/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_get_consent(
201201
201,
202202
"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/9000000017",
203203
),
204-
("9000000000", POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 400, None),
204+
("9000000000", POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 422, None),
205205
("9000000049", POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, 409, None),
206206
("9000000041", POST_CONSENT__INVALID_PATIENT_AGE_ERROR, 422, None),
207207
("9000000033", POST_CONSENT__INVALID_EVIDENCE_ERROR, 422, None),

specification/validated-relationships-service-api.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ paths:
507507
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
508508
| Successful parent-child proxy creation | Valid request with a legal basis of parental responsibility, with performer identifier value of 9000000009 | HTTP Status 201 and OperationOutcome response |
509509
| Successful adult-adult proxy creation | Valid request with legal basis of consent, with performer identifier value of 9000000017 | HTTP Status 201 and OperationOutcome response |
510-
| Invalid performer NHS number | Request with invalid NHS number format, with performer identifier value of 9000000000 | HTTP Status 400 and INVALID_NHS_NUMBER error response |
511-
| Invalid access level | Request with undefined access level code, with performer identifier value of 9000000025 | HTTP Status 400 and INVALID_ACCESS_LEVEL error response |
510+
| Invalid access level | Request with undefined access level code, with performer identifier value of 9000000025 | HTTP Status 403 and INVALID_ACCESS_LEVEL error response |
511+
| Invalid performer NHS number | Request with invalid NHS number format, with performer identifier value of 9000000000 | HTTP Status 422 and INVALID_NHS_NUMBER error response |
512512
| Missing required evidence | Request without evidence of responsibility, with performer identifier value of 9000000033 | HTTP Status 422 and MISSING_EVIDENCE error response |
513513
| Patient age validation failure | Request for child proxy where child is over 16, with performer identifier value of 9000000041 | HTTP Status 422 and INVALID_PATIENT_AGE error response |
514514
| Duplicate relationship | Request for relationship that already exists, with performer identifier value of 9000000049 | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response |

0 commit comments

Comments
 (0)