make sure DBEncryptedFileMetadataManager closes db connection
This commit is contained in:
parent
99c2130be7
commit
55c90e0657
2 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,7 @@ class DBEncryptedFileMetadataManager(object):
|
|||
return self._open_db()
|
||||
|
||||
def stop(self):
|
||||
self.db_conn = None
|
||||
self.db_conn.close()
|
||||
return defer.succeed(True)
|
||||
|
||||
def get_all_streams(self):
|
||||
|
|
|
@ -14,6 +14,7 @@ class DBEncryptedFileMetadataManagerTest(unittest.TestCase):
|
|||
self.manager = DBEncryptedFileMetadataManager(self.db_dir)
|
||||
|
||||
def tearDown(self):
|
||||
self.manager.stop()
|
||||
shutil.rmtree(self.db_dir)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in a new issue