예제 #1
0
def test_all_rights_without_set_card_strictly_false():
    user = User(all_rights_without_set_card)
    assert has_rules(rules_array, user, strictly=False) == True
예제 #2
0
def test_all_rights_strictly_false():
    user = User(all_rights)
    assert has_rules(rules_array, user, strictly=False) == True
예제 #3
0
def test_root_rights_only_strictly_false():
    user = User(root_rights_only)
    assert has_rules(rules_array, user, strictly=False) == True
예제 #4
0
def test_root_rights_only():
    user = User(root_rights_only)
    assert has_rules(rules_array, user) == False
예제 #5
0
def test_all_rights():
    user = User(all_rights)
    assert has_rules(rules_array, user) == True
예제 #6
0
def test_one_not_valid_rights():
    user = User(one_not_valid_rights)
    assert has_rules(rules_array, user) == False