[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:
Calum Lind 2025-02-17 22:40:16 +00:00
parent 7071da85c3
commit 7c5b7b44a3
No known key found for this signature in database
GPG key ID: 90597A687B836BA3

View file

@ -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):