def test_client_cant_send_claim_def(): Authoriser.auth_map = generate_auth_map(Authoriser.ValidRoles, True) r, msg = Authoriser.authorised(typ=CLAIM_DEF, actorRole=None, field="name", isActorOwnerOfSubject=True) assert not r and "None role not in allowed roles" in msg
def test_client_can_send_claim_def(): Authoriser.auth_map = generate_auth_map(Authoriser.ValidRoles, False) r, msg = Authoriser.authorised(typ=CLAIM_DEF, actorRole=None, field="name", isActorOwnerOfSubject=True) assert r and not msg
def initialized_auth_map(): Authoriser.auth_map = generate_auth_map(Authoriser.ValidRoles, False)
def test_client_cant_send_claim_def(): Authoriser.auth_map = generate_auth_map(Authoriser.ValidRoles, False) r, msg = _authorised_for_schemas(None) assert not r and "None role not in allowed roles" in msg
def test_client_can_send_claim_def(): Authoriser.auth_map = generate_auth_map(Authoriser.ValidRoles, True) r, msg = _authorised_for_schemas(None) assert r and not msg