diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2022-06-15 13:22:24 +1200 |
|---|---|---|
| committer | Douglas Bagnall <dbagnall@samba.org> | 2022-09-06 21:12:36 +0000 |
| commit | 251360d6e58986dd53f0317319544e930dc61444 (patch) | |
| tree | fb32878f805b45336e850ec143f1988f3d6dea69 /python | |
| parent | 7455c53fa4f7871b3980f820d22b0fd411195704 (diff) | |
| download | samba-251360d6e58986dd53f0317319544e930dc61444.tar.gz samba-251360d6e58986dd53f0317319544e930dc61444.tar.bz2 samba-251360d6e58986dd53f0317319544e930dc61444.zip | |
pytest/samdb: use TestCaseInTempDir.rm_files/.rm_dirs
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/samdb.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/python/samba/tests/samdb.py b/python/samba/tests/samdb.py index 834c5a204a6..f7697f83fdc 100644 --- a/python/samba/tests/samdb.py +++ b/python/samba/tests/samdb.py @@ -19,7 +19,6 @@ import logging import os -import shutil from samba.auth import system_session from samba.provision import provision @@ -54,11 +53,8 @@ class SamDBTestCase(TestCaseInTempDir): self.lp = self.result.lp def tearDown(self): - for f in ['names.tdb']: - os.remove(os.path.join(self.tempdir, f)) - - for d in ['etc', 'msg.lock', 'private', 'state', 'bind-dns']: - shutil.rmtree(os.path.join(self.tempdir, d)) + self.rm_files('names.tdb') + self.rm_dirs('etc', 'msg.lock', 'private', 'state', 'bind-dns') super(SamDBTestCase, self).tearDown() |
