mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-13 22:03:04 +00:00
WIP: add close method for MagicFolderDB and make MagicFolderDbTests use it.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
a50d0e5c8b
commit
a78e9c750a
@ -53,6 +53,9 @@ class MagicFolderDB(object):
|
||||
self.connection = connection
|
||||
self.cursor = connection.cursor()
|
||||
|
||||
def close(self):
|
||||
self.connection.close()
|
||||
|
||||
def get_db_entry(self, relpath_u):
|
||||
"""
|
||||
Retrieve the entry in the database for a given path, or return None
|
||||
|
@ -42,6 +42,8 @@ class MagicFolderDbTests(unittest.TestCase):
|
||||
self.failUnlessEqual(self.db.VERSION, 1)
|
||||
|
||||
def tearDown(self):
|
||||
if hasattr(self, 'db'):
|
||||
self.db.close()
|
||||
shutil.rmtree(self.temp)
|
||||
return super(MagicFolderDbTests, self).tearDown()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user