[Tests|Py3] Fix prefetch metdata test

This commit is contained in:
Calum Lind 2018-10-08 18:57:52 +01:00
parent 3ed4a6e834
commit 5964bcf897
2 changed files with 2 additions and 2 deletions

View File

@ -399,7 +399,7 @@ class TorrentManager(component.Component):
else:
self.session.remove_torrent(torrent_handle, 1)
metadata = ''
metadata = b''
if isinstance(torrent_info, lt.torrent_info):
log.debug('metadata received')
metadata = torrent_info.metadata()

View File

@ -317,7 +317,7 @@ class CoreTestCase(BaseTestCase):
def test_prefetch_metadata_existing(self):
"""Check another call with same magnet returns existing deferred."""
magnet = 'magnet:?xt=urn:btih:ab570cdd5a17ea1b61e970bb72047de141bce173'
expected = ('ab570cdd5a17ea1b61e970bb72047de141bce173', '')
expected = ('ab570cdd5a17ea1b61e970bb72047de141bce173', b'')
def on_result(result):
self.assertEqual(result, expected)