From 130a4292a2f603000255be8f20c8450e34b0dd4c Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Thu, 21 May 2020 14:28:20 +0200 Subject: [PATCH] fix test failing with no internet --- tests/test_pirate.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_pirate.py b/tests/test_pirate.py index 228fdfc..4c0cf8e 100755 --- a/tests/test_pirate.py +++ b/tests/test_pirate.py @@ -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']))