From e9b58577dd72a969827586ccfe63dbf0caeaa4a6 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 5 Feb 2019 00:38:40 -0300 Subject: [PATCH] tests: verify completed and to announce after assembling streams --- tests/unit/stream/test_assembler.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/stream/test_assembler.py b/tests/unit/stream/test_assembler.py index c7764b978..ac318c45b 100644 --- a/tests/unit/stream/test_assembler.py +++ b/tests/unit/stream/test_assembler.py @@ -4,9 +4,9 @@ import tempfile import shutil from torba.testcase import AsyncioTestCase from lbrynet.conf import Config -from lbrynet.blob.blob_manager import BlobFileManager from lbrynet.blob.blob_file import MAX_BLOB_SIZE from lbrynet.extras.daemon.storage import SQLiteStorage +from lbrynet.blob.blob_manager import BlobFileManager from lbrynet.stream.assembler import StreamAssembler from lbrynet.stream.descriptor import StreamDescriptor @@ -55,6 +55,11 @@ class TestStreamAssembler(AsyncioTestCase): decrypted = f.read() self.assertEqual(decrypted, self.cleartext) self.assertEqual(True, self.blob_manager.get_blob(sd_hash).get_is_verified()) + self.assertEqual(True, self.blob_manager.get_blob(descriptor.blobs[0].blob_hash).get_is_verified()) + self.assertEqual(2, len(await downloader_storage.get_all_finished_blobs())) + self.assertEqual( + [descriptor.sd_hash, descriptor.blobs[0].blob_hash], await downloader_storage.get_blobs_to_announce() + ) await downloader_storage.close() await self.storage.close()