From e7ce389e84b5d764d6067318ed854d1560c6f459 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 27 Nov 2016 15:05:08 +0000 Subject: [PATCH] [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. --- deluge/tests/test_ui_entry.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/deluge/tests/test_ui_entry.py b/deluge/tests/test_ui_entry.py index 5906f600a..c0ad7098d 100644 --- a/deluge/tests/test_ui_entry.py +++ b/deluge/tests/test_ui_entry.py @@ -347,20 +347,7 @@ class ConsoleUIWithDaemonBaseTestCase(UIWithDaemonBaseTestCase): yield self.exec_command() std_output = fd.out.getvalue() - status_output = """Total upload: 0.0 KiB/s -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) + self.assertTrue(std_output.startswith('Total upload: ') and std_output.endswith(' Moving: 0\n')) class ConsoleScriptEntryWithDaemonTestCase(BaseTestCase, ConsoleUIWithDaemonBaseTestCase):