mirror of
https://github.com/logos-storage/deluge.git
synced 2026-05-05 00:53:12 +00:00
A `return` statement was added in ece31cf for unit testing to work but this resulted in Deferred printed in console output. Added a test_start entry point to return the required deferreds while removing the return from original start entrypoint. Closes: https://dev.deluge-torrent.org/ticket/3582 Closes: https://github.com/deluge-torrent/deluge/pull/408
25 lines
624 B
Python
25 lines
624 B
Python
#
|
|
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
|
|
#
|
|
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
|
|
# the additional special exception to link portions of this program with the OpenSSL library.
|
|
# See LICENSE for more details.
|
|
#
|
|
|
|
from deluge.ui.console.console import Console
|
|
|
|
UI_PATH = __path__[0]
|
|
|
|
|
|
def start():
|
|
Console().start()
|
|
|
|
|
|
def test_start():
|
|
"""Entry point for tests
|
|
|
|
A workaround for unit tests which require a deferred object to be
|
|
returned to run properly due to mocking the Twisted reactor.
|
|
"""
|
|
return Console().start()
|