1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-13 16:23:50 +03:00

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>
This commit is contained in:
Douglas Bagnall
2022-06-15 13:20:41 +12:00
committed by Douglas Bagnall
parent 85bc1552e3
commit 4e3dabad0b

View File

@@ -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()