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

adding check for reserved password keys

This commit is contained in:
kakwa 2015-07-13 09:10:36 +02:00
parent 054d361fe9
commit 11064322db
4 changed files with 59 additions and 2 deletions

View file

@ -8,7 +8,7 @@ import pytest
import sys
from sets import Set
from ldapcherry.attributes import Attributes
from ldapcherry.exceptions import MissingAttributesFile, MissingKey, WrongAttributeType, WrongBackend
from ldapcherry.exceptions import *
from ldapcherry.pyyamlwrapper import DumplicatedKey, RelationError
class TestError(object):
@ -81,6 +81,14 @@ class TestError(object):
else:
raise AssertionError("expected an exception")
def testDuplicatePassword(self):
try:
inv = Attributes('./tests/cfg/attribute_pwderror.yml')
except PasswordAttributesCollision:
return
else:
raise AssertionError("expected an exception")
# def testGetDisplayName(self):
# inv = Attributes('./tests/cfg/attributes.yml')
# res = inv.get_display_name('users')