diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2022-06-15 13:20:41 +1200 |
|---|---|---|
| committer | Douglas Bagnall <dbagnall@samba.org> | 2022-09-06 21:12:36 +0000 |
| commit | 4e3dabad0be0900a203896c2c2acb270d31b0a42 (patch) | |
| tree | 450b8e2bb00e58a76bc84b46f424ee3f0dae2a66 /python | |
| parent | 85bc1552e3919d049d39a065824172a24933d38b (diff) | |
| download | samba-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.py | 10 |
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() |
