Skip to content

Commit fbe876f

Browse files
committed
NPA-4514 Remove Old Test Scenarios
1 parent 82fd2c0 commit fbe876f

File tree

5 files changed

+1
-42
lines changed

5 files changed

+1
-42
lines changed

sandbox/api/app.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,12 @@ def post_consent() -> Union[dict, tuple]:
148148
header = {"location": f"{APP_BASE_PATH}/{patient_identifier}"}
149149
response = generate_response_from_example(POST_CONSENT__SUCCESS, 201, headers=header)
150150

151-
# Invalid access level
152-
elif patient_identifier == "9000000025":
153-
response = generate_response_from_example(POST_CONSENT__INVALID_ACCESS_LEVEL_ERROR, 403)
154-
155-
# Missing required evidence
156-
elif patient_identifier == "9000000033":
157-
response = generate_response_from_example(POST_CONSENT__INVALID_EVIDENCE_ERROR, 422)
158-
159-
# Patient age validation failure
160-
elif patient_identifier == "9000000041":
161-
response = generate_response_from_example(POST_CONSENT__INVALID_PATIENT_AGE_ERROR, 422)
162-
163151
# Duplicate relationship
164152
elif patient_identifier == "9000000049":
165153
response = generate_response_from_example(POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, 409)
166-
167154
# Invalid performer NHS number
168155
elif patient_identifier == "9000000000":
169156
response = generate_response_from_example(POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 422)
170-
171157
else:
172158
# Out of scope errors
173159
raise ValueError("Invalid Request")

sandbox/api/constants.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
POST_CONSENT__DIRECTORY = "./api/examples/POST_Consent/"
5252
POST_CONSENT__SUCCESS = f"{POST_CONSENT__DIRECTORY}success.yaml"
5353
POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR = f"{POST_CONSENT__DIRECTORY}errors/duplicate_relationship_error.yaml"
54-
POST_CONSENT__INVALID_ACCESS_LEVEL_ERROR = f"{POST_CONSENT__DIRECTORY}errors/invalid_access_level_error.yaml"
55-
POST_CONSENT__INVALID_EVIDENCE_ERROR = f"{POST_CONSENT__DIRECTORY}errors/invalid_evidence_error.yaml"
56-
POST_CONSENT__INVALID_PATIENT_AGE_ERROR = f"{POST_CONSENT__DIRECTORY}errors/invalid_patient_age_error.yaml"
5754
POST_CONSENT__PERFORMER_IDENTIFIER_ERROR = f"{POST_CONSENT__DIRECTORY}errors/invalid_performer_identifier_error.yaml"
5855

5956
QR_DIRECTORY = "./api/examples/POST_QuestionnaireResponse/"

sandbox/api/tests/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_get_consent(
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),
208-
("9000000025", POST_CONSENT__INVALID_ACCESS_LEVEL_ERROR, 403, None),
208+
209209
],
210210
)
211211
@patch(f"{APP_FILE_PATH}.generate_response_from_example")

specification/examples/responses/POST_Consent/errors/invalid_access_level_error.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

specification/validated-relationships-service-api.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,7 @@ 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 access level | Request with undefined access level code, with performer identifier value of 9000000025 | HTTP Status 403 and INVALID_ACCESS_LEVEL error response |
511510
| Invalid performer NHS number | Request with invalid NHS number format, with performer identifier value of 9000000000 | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response |
512-
| Missing required evidence | Request without evidence of responsibility, with performer identifier value of 9000000033 | HTTP Status 422 and MISSING_EVIDENCE error response |
513-
| 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 |
514511
| Duplicate relationship | Request for relationship that already exists, with performer identifier value of 9000000049 | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response |
515512
516513
operationId: create-proxy-role
@@ -577,12 +574,6 @@ paths:
577574
examples:
578575
postConsentInvalidPerformerIdentifier:
579576
$ref: "./examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml#/PostConsentInvalidPerformerIdentifierError"
580-
postConsentInvalidAccessLevel:
581-
$ref: "./examples/responses/POST_Consent/errors/invalid_access_level_error.yaml#/PostConsentInvalidAccessLevelError"
582-
postConsentMissingEvidence:
583-
$ref: "./examples/responses/POST_Consent/errors/invalid_evidence_error.yaml#/PostConsentInvalidEvidenceError"
584-
postConsentInvalidPatientAge:
585-
$ref: "./examples/responses/POST_Consent/errors/invalid_patient_age_error.yaml#/PostConsentInvalidPatientAgeError"
586577
postConsentDuplicateRelationship:
587578
$ref: "./examples/responses/POST_Consent/errors/duplicate_relationship_error.yaml#/PostConsentDuplicateRelationshipError"
588579

0 commit comments

Comments
 (0)