diff --git a/tests/cfg/roles_content_dump.yml b/tests/cfg/roles_content_dump.yml index d1a2cf7..070ba61 100644 --- a/tests/cfg/roles_content_dump.yml +++ b/tests/cfg/roles_content_dump.yml @@ -4,10 +4,9 @@ users2: - backend_name: ldap groups: - cn=users,ou=group,dc=example,dc=com - - backend_name: ad - groups: + - backend_name: ad + groups: - Domain Users - users: diplay_name: Simple Users LC_admins: True @@ -15,6 +14,6 @@ users: - backend_name: ldap groups: - cn=users,ou=group,dc=example,dc=com - - backend_name: ad - groups: + - backend_name: ad + groups: - Domain Users diff --git a/tests/cfg/roles_key_dump.yml b/tests/cfg/roles_key_dup.yml similarity index 100% rename from tests/cfg/roles_key_dump.yml rename to tests/cfg/roles_key_dup.yml diff --git a/tests/cfg/roles_missing_diplay_name.yml b/tests/cfg/roles_missing_diplay_name.yml index 4a97628..9c1fe8d 100644 --- a/tests/cfg/roles_missing_diplay_name.yml +++ b/tests/cfg/roles_missing_diplay_name.yml @@ -8,12 +8,11 @@ admin-lv3: - cn=nagios admins,ou=group,dc=example,dc=com - cn=puppet admins,ou=group,dc=example,dc=com - cn=users,ou=group,dc=example,dc=com - - backend_name: ad - groups: - - Domain Users - - Administrators - - Domain Controllers - + - backend_name: ad + groups: + - Domain Users + - Administrators + - Domain Controllers admin-lv2: display_name: Administrators Level 2 backends: @@ -21,10 +20,9 @@ admin-lv2: groups: - cn=nagios admins,ou=group,dc=example,dc=com - cn=users,ou=group,dc=example,dc=com - - backend_name: ad - groups: + - backend_name: ad + groups: - Domain Users - developpers: backends: - backend_name: ldap @@ -32,16 +30,15 @@ developpers: - cn=nagios user,ou=group,dc=example,dc=com - cn=developpers,ou=group,dc=example,dc=com - cn=users,ou=group,dc=example,dc=com - - backend_name: ad - groups: + - backend_name: ad + groups: - Domain Users - users: diplay_name: Simple Users backends: - backend_name: ldap groups: - cn=users,ou=group,dc=example,dc=com - - backend_name: ad - groups: + - backend_name: ad + groups: - Domain Users diff --git a/tests/test_Roles.py b/tests/test_Roles.py index 5df076a..b86dfc2 100644 --- a/tests/test_Roles.py +++ b/tests/test_Roles.py @@ -7,6 +7,7 @@ from __future__ import unicode_literals import pytest import sys from ldapcherry.roles import Roles +from ldapcherry.exceptions import DumplicateRoleKey, MissingKey, DumplicateRoleContent from ldapcherry.pyyamlwrapper import DumplicatedKey, RelationError @@ -19,7 +20,7 @@ class TestError(object): def testMissingDisplayName(self): try: - inv = Roles('./cfg/roles_missing_diplay_name.yml') + inv = Roles('./tests/cfg/roles_missing_diplay_name.yml') except MissingKey: return else: