mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
[Tests] Ensure tear_down deletes rpcserver and core
This commit is contained in:
parent
a7c7309027
commit
0c574f33e1
@ -37,14 +37,18 @@ class TorrentTestCase(BaseTestCase):
|
||||
|
||||
def set_up(self):
|
||||
self.setup_config()
|
||||
RPCServer(listen=False)
|
||||
self.rpcserver = RPCServer(listen=False)
|
||||
self.core = Core()
|
||||
self.session = lt.session()
|
||||
self.torrent = None
|
||||
return component.start()
|
||||
|
||||
def tear_down(self):
|
||||
return component.shutdown()
|
||||
def on_shutdown(result):
|
||||
del self.rpcserver
|
||||
del self.core
|
||||
|
||||
return component.shutdown().addCallback(on_shutdown)
|
||||
|
||||
def print_priority_list(self, priorities):
|
||||
tmp = ''
|
||||
|
@ -29,12 +29,17 @@ class TorrentmanagerTestCase(BaseTestCase):
|
||||
|
||||
def set_up(self):
|
||||
common.set_tmp_config_dir()
|
||||
RPCServer(listen=False)
|
||||
self.rpcserver = RPCServer(listen=False)
|
||||
self.core = Core()
|
||||
return component.start()
|
||||
|
||||
def tear_down(self):
|
||||
return component.shutdown()
|
||||
|
||||
def on_shutdown(result):
|
||||
del self.rpcserver
|
||||
del self.core
|
||||
|
||||
return component.shutdown().addCallback(on_shutdown)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_remove_torrent(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user