From 99c2130be7e0d514aac984eec12886c717d59d44 Mon Sep 17 00:00:00 2001 From: Kay Kurokawa Date: Fri, 30 Jun 2017 15:49:42 -0400 Subject: [PATCH] fix for test_blobmanager --- tests/unit/core/test_BlobManager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/unit/core/test_BlobManager.py b/tests/unit/core/test_BlobManager.py index 1ef13a2d2..d7cb41889 100644 --- a/tests/unit/core/test_BlobManager.py +++ b/tests/unit/core/test_BlobManager.py @@ -100,8 +100,8 @@ class BlobManagerTest(unittest.TestCase): # open the last blob blob = yield self.bm.get_blob(blob_hashes[-1]) - yield blob.open_for_writing(self.peer) - + finished_d, write, cancel = yield blob.open_for_writing(self.peer) + # delete the last blob and check if it still exists out = yield self.bm.delete_blobs([blob_hash]) blobs = yield self.bm.get_all_verified_blobs() @@ -109,4 +109,5 @@ class BlobManagerTest(unittest.TestCase): self.assertTrue(blob_hashes[-1] in blobs) self.assertTrue(os.path.isfile(os.path.join(self.blob_dir,blob_hashes[-1]))) - + + blob._close_writer(blob.writers[self.peer][0])