1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-09 09:59:51 +01:00

fix test failing with no internet

This commit is contained in:
Michele Guerini Rocco 2020-05-21 14:28:20 +02:00
parent 7f879cc31f
commit 130a4292a2
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -31,10 +31,11 @@ class TestPirate(unittest.TestCase):
'magnet': 'magnet:?xt=urn:btih:deadbeef&dn=derp',
'seeders': '1',
'leechers': '1',
'size': ('1', 'mb'),
'size': '1 MB',
'uploaded': '1',
}
with patch('pirate.torrent.remote', return_value=[result]):
with patch('pirate.pirate.connect_mirror',
return_value=([result], '')):
config = pirate.pirate.parse_config_file('')
args = pirate.pirate.combine_configs(
config,
@ -51,10 +52,11 @@ class TestPirate(unittest.TestCase):
'magnet': 'magnet:?xt=urn:btih:deadbeef&dn=derp',
'seeders': '1',
'leechers': '1',
'size': ('1', 'mb'),
'size': '1 MB',
'uploaded': '1',
}
with patch('pirate.torrent.remote', return_value=[result]):
with patch('pirate.pirate.connect_mirror',
return_value=([result], '')):
config = pirate.pirate.parse_config_file('')
args = pirate.pirate.combine_configs(
config, pirate.pirate.parse_args(['term', '-C', 'blah %s']))