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:
parent
7f879cc31f
commit
130a4292a2
@ -31,10 +31,11 @@ class TestPirate(unittest.TestCase):
|
|||||||
'magnet': 'magnet:?xt=urn:btih:deadbeef&dn=derp',
|
'magnet': 'magnet:?xt=urn:btih:deadbeef&dn=derp',
|
||||||
'seeders': '1',
|
'seeders': '1',
|
||||||
'leechers': '1',
|
'leechers': '1',
|
||||||
'size': ('1', 'mb'),
|
'size': '1 MB',
|
||||||
'uploaded': '1',
|
'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('')
|
config = pirate.pirate.parse_config_file('')
|
||||||
args = pirate.pirate.combine_configs(
|
args = pirate.pirate.combine_configs(
|
||||||
config,
|
config,
|
||||||
@ -51,10 +52,11 @@ class TestPirate(unittest.TestCase):
|
|||||||
'magnet': 'magnet:?xt=urn:btih:deadbeef&dn=derp',
|
'magnet': 'magnet:?xt=urn:btih:deadbeef&dn=derp',
|
||||||
'seeders': '1',
|
'seeders': '1',
|
||||||
'leechers': '1',
|
'leechers': '1',
|
||||||
'size': ('1', 'mb'),
|
'size': '1 MB',
|
||||||
'uploaded': '1',
|
'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('')
|
config = pirate.pirate.parse_config_file('')
|
||||||
args = pirate.pirate.combine_configs(
|
args = pirate.pirate.combine_configs(
|
||||||
config, pirate.pirate.parse_args(['term', '-C', 'blah %s']))
|
config, pirate.pirate.parse_args(['term', '-C', 'blah %s']))
|
||||||
|
Loading…
Reference in New Issue
Block a user