summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python/passwords.py
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-18 16:06:46 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-18 17:03:20 +0000
commit4c666f3e0ada47c793ecdec0e5c3dd0441a69080 (patch)
tree1c02a3252fdcadfeb5456b5c158171acafeb9801 /source4/dsdb/tests/python/passwords.py
parentb7dab4692200dd7f3bbc600560648b8e0ec47e70 (diff)
downloadsamba-4c666f3e0ada47c793ecdec0e5c3dd0441a69080.tar.gz
samba-4c666f3e0ada47c793ecdec0e5c3dd0441a69080.tar.bz2
samba-4c666f3e0ada47c793ecdec0e5c3dd0441a69080.zip
s4:dsdb python tests - use "ldb.domain_dn"
By inspiration of Nadya's patches
Diffstat (limited to 'source4/dsdb/tests/python/passwords.py')
-rwxr-xr-xsource4/dsdb/tests/python/passwords.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index 8cb7136ebb..f238c1adc4 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -69,16 +69,10 @@ class PasswordTests(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(PasswordTests, self).setUp()
self.ldb = ldb
- self.base_dn = self.find_basedn(ldb)
+ self.base_dn = ldb.domain_dn()
# (Re)adds the test user "testuser" with no password atm
self.delete_force(self.ldb, "cn=testuser,cn=users," + self.base_dn)