mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-03 11:57:41 +02:00
implementing nesting roles
This commit is contained in:
parent
d74893d104
commit
7524a189fe
11 changed files with 295 additions and 163 deletions
|
@ -10,7 +10,6 @@ from ldapcherry.roles import Roles
|
|||
from ldapcherry.exceptions import DumplicateRoleKey, MissingKey, DumplicateRoleContent, MissingRolesFile
|
||||
from ldapcherry.pyyamlwrapper import DumplicatedKey, RelationError
|
||||
|
||||
|
||||
class TestError(object):
|
||||
|
||||
def testNominal(self):
|
||||
|
@ -26,6 +25,14 @@ class TestError(object):
|
|||
else:
|
||||
raise AssertionError("expected an exception")
|
||||
|
||||
def testMissingBackends(self):
|
||||
try:
|
||||
inv = Roles('./tests/cfg/roles_missing_backends.yml')
|
||||
except MissingKey:
|
||||
return
|
||||
else:
|
||||
raise AssertionError("expected an exception")
|
||||
|
||||
def testRoleKeyDuplication(self):
|
||||
try:
|
||||
inv = Roles('./tests/cfg/roles_key_dup.yml')
|
||||
|
@ -45,7 +52,7 @@ class TestError(object):
|
|||
|
||||
def testRoleContentDuplication(self):
|
||||
try:
|
||||
inv = Roles('./tests/cfg/roles_content_dump.yml')
|
||||
inv = Roles('./tests/cfg/roles_content_dup.yml')
|
||||
except DumplicateRoleContent:
|
||||
return
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue