summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2022-06-15 13:19:28 +1200
committerDouglas Bagnall <dbagnall@samba.org>2022-09-06 21:12:36 +0000
commit85bc1552e3919d049d39a065824172a24933d38b (patch)
tree337aa73c11f11500695880300bc4c0365f4b873c /python
parent2359741b2854a8de9d151fe189be80a4bd087ff9 (diff)
downloadsamba-85bc1552e3919d049d39a065824172a24933d38b.tar.gz
samba-85bc1552e3919d049d39a065824172a24933d38b.tar.bz2
samba-85bc1552e3919d049d39a065824172a24933d38b.zip
pytest/downgradedatabase: use TestCaseInTempDir.rm_files
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/blackbox/downgradedatabase.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/python/samba/tests/blackbox/downgradedatabase.py b/python/samba/tests/blackbox/downgradedatabase.py
index f6da011ede4..8d80ef6e804 100644
--- a/python/samba/tests/blackbox/downgradedatabase.py
+++ b/python/samba/tests/blackbox/downgradedatabase.py
@@ -18,7 +18,6 @@
from samba.tests import BlackboxTestCase
import os
import ldb
-import shutil
from subprocess import check_output
from samba.samdb import SamDB
@@ -57,13 +56,12 @@ class DowngradeTestBase(BlackboxTestCase):
self.dbs.append(self.sam_path)
def tearDown(self):
- shutil.rmtree(os.path.join(self.tempdir, "private"))
- shutil.rmtree(os.path.join(self.tempdir, "etc"))
- shutil.rmtree(os.path.join(self.tempdir, "state"))
- shutil.rmtree(os.path.join(self.tempdir, "bind-dns"))
- shutil.rmtree(os.path.join(self.tempdir, "msg.lock"))
- os.unlink(os.path.join(self.tempdir, "names.tdb"))
- os.unlink(os.path.join(self.tempdir, "gencache.tdb"))
+ self.rm_dirs("private",
+ "etc",
+ "state",
+ "bind-dns",
+ "msg.lock")
+ self.rm_files("names.tdb", "gencache.tdb")
super(DowngradeTestBase, self).tearDown()
# Parse out the comments above each record that ldbdump produces