From 4c666f3e0ada47c793ecdec0e5c3dd0441a69080 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 18 Nov 2010 16:06:46 +0100 Subject: s4:dsdb python tests - use "ldb.domain_dn" By inspiration of Nadya's patches --- source4/dsdb/tests/python/urgent_replication.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source4/dsdb/tests/python/urgent_replication.py') diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py index 2ab8c5422e..88cef4dfad 100755 --- a/source4/dsdb/tests/python/urgent_replication.py +++ b/source4/dsdb/tests/python/urgent_replication.py @@ -48,16 +48,10 @@ class UrgentReplicationTests(samba.tests.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_NO_SUCH_OBJECT) - def find_basedn(self, ldb): - res = ldb.search(base="", expression="", scope=SCOPE_BASE, - attrs=["defaultNamingContext"]) - self.assertEquals(len(res), 1) - return res[0]["defaultNamingContext"][0] - def setUp(self): super(UrgentReplicationTests, self).setUp() self.ldb = ldb - self.base_dn = self.find_basedn(ldb) + self.base_dn = ldb.domain_dn() print "baseDN: %s\n" % self.base_dn -- cgit