File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
lambdas/tests/unit/services Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11import pytest
22from enums .repository_role import RepositoryRole
3+ from models .staging_metadata import NHS_NUMBER_PLACEHOLDER
34from services .authoriser_service import AuthoriserService
45from tests .unit .conftest import TEST_UUID
56from utils .exceptions import AuthorisationException
@@ -145,6 +146,15 @@ def test_deny_access_policy_for_various_paths_and_roles(
145146 assert actual == expected
146147
147148
149+ def test_deny_access_policy_allows_review_for_placeholder_nhs_number (
150+ mock_auth_service : AuthoriserService ,
151+
152+ ):
153+ roles = [RepositoryRole .GP_ADMIN .value , RepositoryRole .GP_CLINICAL .value , RepositoryRole .PCSE .value ]
154+ for role in roles :
155+ actual = mock_auth_service .deny_access_policy (f"/DocumentReview/{ TEST_UUID } /1" , role , NHS_NUMBER_PLACEHOLDER )
156+ assert actual == False
157+
148158@pytest .mark .parametrize (
149159 "path" ,
150160 [
You can’t perform that action at this time.
0 commit comments