mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 05:47:50 +00:00
[Tests] Fix test_ui_entry failure with libtorrent 1.1
- With libtorrent 1.1 dht is enabled from startup and the returned status contains DHT node values (i.e. non-zero). Should be sufficient to only test for start and end of the status string to be correct.
This commit is contained in:
parent
0f2083db62
commit
e7ce389e84
@ -347,20 +347,7 @@ class ConsoleUIWithDaemonBaseTestCase(UIWithDaemonBaseTestCase):
|
|||||||
yield self.exec_command()
|
yield self.exec_command()
|
||||||
|
|
||||||
std_output = fd.out.getvalue()
|
std_output = fd.out.getvalue()
|
||||||
status_output = """Total upload: 0.0 KiB/s
|
self.assertTrue(std_output.startswith('Total upload: ') and std_output.endswith(' Moving: 0\n'))
|
||||||
Total download: 0.0 KiB/s
|
|
||||||
DHT Nodes: 0
|
|
||||||
Total torrents: 0
|
|
||||||
Allocating: 0
|
|
||||||
Checking: 0
|
|
||||||
Downloading: 0
|
|
||||||
Seeding: 0
|
|
||||||
Paused: 0
|
|
||||||
Error: 0
|
|
||||||
Queued: 0
|
|
||||||
Moving: 0
|
|
||||||
"""
|
|
||||||
self.assertEqual(std_output, status_output)
|
|
||||||
|
|
||||||
|
|
||||||
class ConsoleScriptEntryWithDaemonTestCase(BaseTestCase, ConsoleUIWithDaemonBaseTestCase):
|
class ConsoleScriptEntryWithDaemonTestCase(BaseTestCase, ConsoleUIWithDaemonBaseTestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user