summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-08 20:34:40 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-08 23:20:36 +0200
commita35d876537eb301d75a254d9da97268d041da8d6 (patch)
tree488e96e7f4bd61b50494b9f43648ed3be873df4e /source4/lib/ldb/tests/python
parentcc6e2b8a819c6a1da4e6214be9607aab2de270bb (diff)
downloadsamba-a35d876537eb301d75a254d9da97268d041da8d6.tar.gz
samba-a35d876537eb301d75a254d9da97268d041da8d6.tar.bz2
samba-a35d876537eb301d75a254d9da97268d041da8d6.zip
s4-python: rename samba.glue to samba._glue to indicate it's private.
Diffstat (limited to 'source4/lib/ldb/tests/python')
-rwxr-xr-xsource4/lib/ldb/tests/python/urgent_replication.py52
1 files changed, 26 insertions, 26 deletions
diff --git a/source4/lib/ldb/tests/python/urgent_replication.py b/source4/lib/ldb/tests/python/urgent_replication.py
index 41eae8de5f..97b06fbb9a 100755
--- a/source4/lib/ldb/tests/python/urgent_replication.py
+++ b/source4/lib/ldb/tests/python/urgent_replication.py
@@ -15,7 +15,7 @@ from samba.auth import system_session
from ldb import (SCOPE_BASE, LdbError, ERR_NO_SUCH_OBJECT, Message,
MessageElement, Dn, FLAG_MOD_REPLACE)
from samba import Ldb
-from samba import glue
+from samba import _glue
from subunit.run import SubunitTestRunner
import unittest
@@ -68,7 +68,7 @@ class UrgentReplicationTests(unittest.TestCase):
"description":"nonurgenttest description"});
# urgent replication should not be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should not be enabled when modifying
@@ -77,12 +77,12 @@ class UrgentReplicationTests(unittest.TestCase):
m["description"] = MessageElement("new description", FLAG_MOD_REPLACE,
"description")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should not be enabled when deleting
self.delete_force(self.ldb, "cn=nonurgenttest,cn=users," + self.base_dn)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
@@ -105,7 +105,7 @@ instanceType: 4
systemFlags: 33554432""", ["relax:0"]);
# urgent replication should be enabled when creation
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should NOT be enabled when modifying
@@ -114,12 +114,12 @@ systemFlags: 33554432""", ["relax:0"]);
m["options"] = MessageElement("0", FLAG_MOD_REPLACE,
"options")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when deleting
self.delete_force(self.ldb, "cn=NTDS Settings test,cn=test server,cn=Servers,cn=Default-First-Site-Name,cn=Sites,cn=Configuration," + self.base_dn)
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
self.delete_force(self.ldb, "cn=test server,cn=Servers,cn=Default-First-Site-Name,cn=Sites,cn=Configuration," + self.base_dn)
@@ -139,7 +139,7 @@ systemFlags: 33554432""", ["relax:0"]);
"systemFlags": "1"});
# urgent replication should be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should NOT be enabled when modifying
@@ -148,13 +148,13 @@ systemFlags: 33554432""", ["relax:0"]);
m["systemFlags"] = MessageElement("0", FLAG_MOD_REPLACE,
"systemFlags")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when deleting
self.delete_force(self.ldb, "cn=test crossRef,CN=Partitions,CN=Configuration," + self.base_dn)
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
@@ -183,7 +183,7 @@ name: test attributeSchema
systemFlags: 0""", ["relax:0"]);
# urgent replication should be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
except LdbError:
@@ -195,7 +195,7 @@ systemFlags: 0""", ["relax:0"]);
m["lDAPDisplayName"] = MessageElement("updated test attributeSchema", FLAG_MOD_REPLACE,
"lDAPDisplayName")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
@@ -226,7 +226,7 @@ systemFlags: 16
defaultHidingValue: TRUE""", ["relax:0"]);
# urgent replication should be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
except LdbError:
@@ -238,7 +238,7 @@ defaultHidingValue: TRUE""", ["relax:0"]);
m["lDAPDisplayName"] = MessageElement("updated test classSchema", FLAG_MOD_REPLACE,
"lDAPDisplayName")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, "cn=Schema,cn=Configuration," + self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
@@ -255,7 +255,7 @@ defaultHidingValue: TRUE""", ["relax:0"]);
# urgent replication should be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when modifying
@@ -264,12 +264,12 @@ defaultHidingValue: TRUE""", ["relax:0"]);
m["currentValue"] = MessageElement("yyyyyyyy", FLAG_MOD_REPLACE,
"currentValue")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should NOT be enabled when deleting
self.delete_force(self.ldb, "cn=test secret,cn=System," + self.base_dn)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
@@ -288,7 +288,7 @@ isCriticalSystemObject: TRUE
rIDAvailablePool: 133001-1073741823""", ["relax:0"])
# urgent replication should be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when modifying
@@ -297,12 +297,12 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"])
m["systemFlags"] = MessageElement("0", FLAG_MOD_REPLACE,
"systemFlags")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should NOT be enabled when deleting
self.delete_force(self.ldb, "CN=RID Manager test,CN=System," + self.base_dn)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
@@ -320,7 +320,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"])
"description":"urgent attributes test description"});
# urgent replication should NOT be enabled when creating
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when modifying userAccountControl
@@ -329,7 +329,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"])
m["userAccountControl"] = MessageElement("0", FLAG_MOD_REPLACE,
"userAccountControl")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when modifying lockoutTime
@@ -338,7 +338,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"])
m["lockoutTime"] = MessageElement("1", FLAG_MOD_REPLACE,
"lockoutTime")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should be enabled when modifying pwdLastSet
@@ -347,7 +347,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"])
m["pwdLastSet"] = MessageElement("1", FLAG_MOD_REPLACE,
"pwdLastSet")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should NOT be enabled when modifying a not-urgent
@@ -357,12 +357,12 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"])
m["description"] = MessageElement("updated urgent attributes test description",
FLAG_MOD_REPLACE, "description")
ldb.modify(m)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);
# urgent replication should NOT be enabled when deleting
self.delete_force(self.ldb, "cn=user UrgAttr test,cn=users," + self.base_dn)
- res = glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
+ res = _glue.dsdb_load_partition_usn(self.ldb, self.base_dn)
self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]);