From 915ab668f5d34009cd6cf64683ce7bc9e943c8e0 Mon Sep 17 00:00:00 2001 From: Kay Kurokawa Date: Tue, 5 Dec 2017 13:12:29 -0500 Subject: [PATCH] add some tests to make sure file status after reflector server download (make sure in stopped state, and have correct number of blobs) --- lbrynet/tests/functional/test_reflector.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lbrynet/tests/functional/test_reflector.py b/lbrynet/tests/functional/test_reflector.py index b58c1e455..16a948358 100644 --- a/lbrynet/tests/functional/test_reflector.py +++ b/lbrynet/tests/functional/test_reflector.py @@ -212,6 +212,12 @@ class TestReflector(unittest.TestCase): self.assertEqual(self.sd_hash, files[0].sd_hash) self.assertEqual('test_file', files[0].file_name) + status = yield files[0].status() + self.assertEqual('stopped', status.running_status) + num_blobs = len(self.expected_blobs) -1 # subtract sd hash + self.assertEqual(num_blobs, status.num_completed) + self.assertEqual(num_blobs, status.num_known) + # check should_announce blobs on blob_manager blob_hashes = yield self.server_blob_manager._get_all_should_announce_blob_hashes() self.assertEqual(2, len(blob_hashes))