From: Douglas Bagnall Date: Wed, 15 Jun 2022 01:21:16 +0000 (+1200) Subject: pytest/join: use TestCaseInTempDir.rm_files/dirs X-Git-Tag: talloc-2.4.0~1202 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7455c53fa4f7871b3980f820d22b0fd411195704;p=thirdparty%2Fsamba.git pytest/join: use TestCaseInTempDir.rm_files/dirs Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power --- diff --git a/python/samba/tests/join.py b/python/samba/tests/join.py index db9d8a892b7..da34171da28 100644 --- a/python/samba/tests/join.py +++ b/python/samba/tests/join.py @@ -74,10 +74,8 @@ class JoinTestCase(DNSTKeyTest): if paths is not None: shutil.rmtree(paths.private_dir) shutil.rmtree(paths.state_dir) - shutil.rmtree(os.path.join(self.tempdir, "etc")) - shutil.rmtree(os.path.join(self.tempdir, "msg.lock")) - os.unlink(os.path.join(self.tempdir, "names.tdb")) - shutil.rmtree(os.path.join(self.tempdir, "bind-dns")) + self.rm_dirs("etc", "msg.lock", "bind-dns") + self.rm_files("names.tdb") self.join_ctx.cleanup_old_join(force=True)