From acffe258960c261903eefce630bbf02acbef1348 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 7 Nov 2010 22:35:29 +0100 Subject: s4:passwords.py - add another two failure cases --- source4/dsdb/tests/python/passwords.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source4/dsdb/tests') diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py index 66a6cf93ea..19ebfb5d49 100755 --- a/source4/dsdb/tests/python/passwords.py +++ b/source4/dsdb/tests/python/passwords.py @@ -402,6 +402,27 @@ userPassword: thatsAcomplPASS1 dn: cn=testuser,cn=users,""" + self.base_dn + """ changetype: modify delete: userPassword +userPassword: thatsAcomplPASS1 +""") + self.fail() + except LdbError, (num, _): + self.assertEquals(num, ERR_CONSTRAINT_VIOLATION) + + try: + ldb.modify_ldif(""" +dn: cn=testuser,cn=users,""" + self.base_dn + """ +changetype: modify +delete: userPassword +""") + self.fail() + except LdbError, (num, _): + self.assertEquals(num, ERR_CONSTRAINT_VIOLATION) + + try: + self.ldb2.modify_ldif(""" +dn: cn=testuser,cn=users,""" + self.base_dn + """ +changetype: modify +delete: userPassword """) self.fail() except LdbError, (num, _): -- cgit