'Testing whether the right vod file size is returned in LibtorrentDownloadImpl'

def test_get_vod_filesize(self):

    mock_file_entry = MockObject()
    mock_file_entry.size = 42
    mock_torrent_info = MockObject()
    mock_torrent_info.file_at = (lambda _: mock_file_entry)
    self.libtorrent_download_impl.handle.get_torrent_info = (lambda : mock_torrent_info)
    self.libtorrent_download_impl.vod_index = None
    self.assertEqual(self.libtorrent_download_impl.get_vod_filesize(), 0)
    self.libtorrent_download_impl.vod_index = 42
    self.assertEqual(self.libtorrent_download_impl.get_vod_filesize(), 42)
