mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-03 19:07:47 +03:00
[Tests] Remove duplicate daemon setup for Console UI tests
The tests setup for TestConsoleScriptEntryWithDaemon uses a daemon fixture so remove the extra DaemonBase setup
This commit is contained in:
parent
7071da85c3
commit
7c5b7b44a3
1 changed files with 2 additions and 12 deletions
|
@ -25,7 +25,6 @@ from deluge.ui import ui_entry
|
|||
from deluge.ui.web.server import DelugeWeb
|
||||
|
||||
from . import common
|
||||
from .daemon_base import DaemonBase
|
||||
|
||||
DEBUG_COMMAND = False
|
||||
|
||||
|
@ -68,15 +67,6 @@ class UIBaseTestCase:
|
|||
return self.var['start_cmd']()
|
||||
|
||||
|
||||
class UIWithDaemonBaseTestCase(UIBaseTestCase, DaemonBase):
|
||||
"""Subclass for test that require a deluged daemon"""
|
||||
|
||||
def set_up(self):
|
||||
d = self.common_set_up()
|
||||
common.setup_test_logger(level='info', prefix=self.config_dir / self.id())
|
||||
return d
|
||||
|
||||
|
||||
class TestDelugeEntry(BaseTestCase):
|
||||
def set_up(self):
|
||||
return component.start()
|
||||
|
@ -319,13 +309,13 @@ class ConsoleUIBaseTestCase(UIBaseTestCase):
|
|||
assert 'unrecognized arguments: --ui' in fd.out.getvalue()
|
||||
|
||||
|
||||
class ConsoleUIWithDaemonBaseTestCase(UIWithDaemonBaseTestCase):
|
||||
class ConsoleUIWithDaemonBaseTestCase(UIBaseTestCase):
|
||||
"""Implement Console tests that require a running daemon"""
|
||||
|
||||
def set_up(self):
|
||||
# Avoid calling reactor.shutdown after commands are executed by main.exec_args()
|
||||
deluge.ui.console.main.reactor = common.ReactorOverride()
|
||||
return UIWithDaemonBaseTestCase.set_up(self)
|
||||
return super().set_up()
|
||||
|
||||
def patch_arg_command(self, command):
|
||||
if isinstance(command, str):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue