Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
def initialized_auth_map():
    Authoriser.auth_map = generate_auth_map(Authoriser.ValidRoles, False)
Exemplo n.º 4
0
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
Exemplo n.º 5
0
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