diff options
Diffstat (limited to 'source4/torture/drs/python/drs_base.py')
-rw-r--r-- | source4/torture/drs/python/drs_base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py index abfdbf5bd3..f692edc4f5 100644 --- a/source4/torture/drs/python/drs_base.py +++ b/source4/torture/drs/python/drs_base.py @@ -25,6 +25,7 @@ import os sys.path.insert(0, "bin/python") import samba +from samba import dsdb samba.ensure_external_module("testtools", "testtools") samba.ensure_external_module("subunit", "subunit/python") @@ -85,6 +86,13 @@ class DrsBaseTestCase(samba.tests.BlackboxTestCase): self.assertEquals(len(res), 1) return str(res[0]["dn"]) + def _lost_and_found_dn(self, sam_ldb, nc): + wkdn = "<WKGUID=%s,%s>" % (dsdb.DS_GUID_LOSTANDFOUND_CONTAINER, nc) + res = sam_ldb.search(base=wkdn, + scope=SCOPE_BASE) + self.assertEquals(len(res), 1) + return str(res[0]["dn"]) + def _make_obj_name(self, prefix): return prefix + time.strftime("%s", time.gmtime()) |