summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-07 22:35:29 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-08 11:27:03 +0000
commitacffe258960c261903eefce630bbf02acbef1348 (patch)
treeb85d58d6bda21ccd70d6e0fc6613d01f83c4c081 /source4/dsdb/tests
parent9aa0ed2c3a74c6d72e42e4bc9e6077a50343fd38 (diff)
downloadsamba-acffe258960c261903eefce630bbf02acbef1348.tar.gz
samba-acffe258960c261903eefce630bbf02acbef1348.tar.bz2
samba-acffe258960c261903eefce630bbf02acbef1348.zip
s4:passwords.py - add another two failure cases
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-xsource4/dsdb/tests/python/passwords.py21
1 files changed, 21 insertions, 0 deletions
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, _):