From 61132312dd3acc9a54c4ed16b9b151c3024e036b Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 21 Feb 2019 21:00:14 -0300 Subject: [PATCH] test nullify length on blob delete --- tests/unit/stream/test_stream_descriptor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit/stream/test_stream_descriptor.py b/tests/unit/stream/test_stream_descriptor.py index 36353c772..0f095e39d 100644 --- a/tests/unit/stream/test_stream_descriptor.py +++ b/tests/unit/stream/test_stream_descriptor.py @@ -118,8 +118,11 @@ class TestRecoverOldStreamDescriptors(AsyncioTestCase): handle.write(b'doesnt work') blob = BlobFile(loop, tmp_dir, sd_hash) self.assertTrue(blob.file_exists) + self.assertIsNotNone(blob.length) with self.assertRaises(InvalidStreamDescriptorError): await StreamDescriptor.from_stream_descriptor_blob( - loop, tmp_dir, BlobFile(loop, tmp_dir, sd_hash) + loop, tmp_dir, blob ) self.assertFalse(blob.file_exists) + # fixme: this is an emergency PR, plase move this to blob_file tests later + self.assertIsNone(blob.length)