make sure DBEncryptedFileMetadataManager closes db connection

This commit is contained in:
Kay Kurokawa 2017-06-30 16:18:54 -04:00
parent 99c2130be7
commit 55c90e0657
2 changed files with 2 additions and 1 deletions

View file

@ -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):

View file

@ -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