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:
committed by
Douglas Bagnall
parent
85bc1552e3
commit
4e3dabad0b
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user