1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-03 11:57:41 +02:00

implementing nesting roles

This commit is contained in:
kakwa 2015-05-15 01:03:31 +02:00
parent d74893d104
commit 7524a189fe
11 changed files with 295 additions and 163 deletions

View file

@ -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: