summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2022-06-15 13:20:41 +1200
committerDouglas Bagnall <dbagnall@samba.org>2022-09-06 21:12:36 +0000
commit4e3dabad0be0900a203896c2c2acb270d31b0a42 (patch)
tree450b8e2bb00e58a76bc84b46f424ee3f0dae2a66 /python
parent85bc1552e3919d049d39a065824172a24933d38b (diff)
downloadsamba-4e3dabad0be0900a203896c2c2acb270d31b0a42.tar.gz
samba-4e3dabad0be0900a203896c2c2acb270d31b0a42.tar.bz2
samba-4e3dabad0be0900a203896c2c2acb270d31b0a42.zip
pytest/samdb_api: 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/samdb_api.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/python/samba/tests/samdb_api.py b/python/samba/tests/samdb_api.py
index a7260180187..710d0bc310f 100644
--- a/python/samba/tests/samdb_api.py
+++ b/python/samba/tests/samdb_api.py
@@ -29,15 +29,7 @@ class SamDBApiTestCase(TestCaseInTempDir):
super(SamDBApiTestCase, self).setUp()
def tearDown(self):
- try:
- os.remove(self.tempdir + "/test.db")
- except OSError as e:
- self.assertEqual(e.errno, errno.ENOENT)
-
- try:
- os.remove(self.tempdir + "/existing.db")
- except OSError as e:
- self.assertEqual(e.errno, errno.ENOENT)
+ self.rm_files("test.db", "existing.db", allow_missing=True)
super(SamDBApiTestCase, self).tearDown()