From 31787417ca9d01965a9f5221ff6adc48a4b1a15f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 Jul 2012 16:00:58 +1000 Subject: s4-repl: Add tests for add replication conflicts and use of LostAndFound LostAndFound is used when we find children of a deleted object that are not themselves deleted. Andrew Bartlett --- source4/torture/drs/python/drs_base.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/torture/drs/python/drs_base.py') 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 = "" % (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()) -- cgit