summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-07 11:59:57 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-07 14:22:42 +0200
commit8243272fa071dadd62199f84d7caf608d90ea6ed (patch)
treed482a59736bcd2e7d27b196e8aa967ae9db0288d /source4/dsdb
parentf99d672b138e17e6b40f286a527812f75b65c3d7 (diff)
downloadsamba-8243272fa071dadd62199f84d7caf608d90ea6ed.tar.gz
samba-8243272fa071dadd62199f84d7caf608d90ea6ed.tar.bz2
samba-8243272fa071dadd62199f84d7caf608d90ea6ed.zip
s4:ldap.py - test the new "systemFlags" constraint
Diffstat (limited to 'source4/dsdb')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 133ff584ac..7cf02ea97d 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -29,7 +29,7 @@ from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE
from samba import Ldb
from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_WORKSTATION_TRUST_ACCOUNT,
UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE, ATYPE_NORMAL_ACCOUNT,
- ATYPE_WORKSTATION_TRUST)
+ ATYPE_WORKSTATION_TRUST, SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE)
from subunit.run import SubunitTestRunner
import unittest
@@ -152,6 +152,16 @@ class BasicTests(unittest.TestCase):
except LdbError, (num, _):
self.assertEquals(num, ERR_OBJECT_CLASS_VIOLATION)
+ # Multi-valued "systemFlags"
+ try:
+ self.ldb.add({
+ "dn": "cn=ldaptestuser,cn=users," + self.base_dn,
+ "objectClass": "person",
+ "systemFlags": ["0", str(SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE)] })
+ self.fail()
+ except LdbError, (num, _):
+ self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
+
# We cannot instanciate from an abstract objectclass
try:
self.ldb.add({