1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

ldb:test:api_search: tidy up files in each subclass

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Douglas Bagnall 2024-08-29 11:05:28 +12:00 committed by Andreas Schneider
parent 2029cd7a7b
commit f7269c2fa3

View File

@ -212,7 +212,10 @@ class SearchTests(LdbBaseTest):
self.l = ldb.Ldb(self.url(),
flags=self.flags(),
options=self.options)
self.addCleanup(self.l.disconnect)
def tearDown(self):
self.l.disconnect()
os.unlink(self.filename)
def test_base(self):
"""Testing a search"""
@ -1395,7 +1398,10 @@ class LdbResultTests(LdbBaseTest):
f"{self.id().rsplit('.',1)[1]}.ldb")
shutil.copy(self.reference_db, self.filename)
self.l = ldb.Ldb(self.url(), flags=self.flags())
self.addCleanup(self.l.disconnect)
def tearDown(self):
self.l.disconnect()
os.unlink(self.filename)
def test_return_type(self):
res = self.l.search()