From b8ab6e4083c3617445a6e23d2e2fdef336f2ddd2 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Fri, 19 Sep 2014 13:38:46 +0100 Subject: [PATCH] [Tests] Replace module import with sys.modules --- deluge/tests/test_torrent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/tests/test_torrent.py b/deluge/tests/test_torrent.py index 699a04f92..5bfac30be 100644 --- a/deluge/tests/test_torrent.py +++ b/deluge/tests/test_torrent.py @@ -1,13 +1,13 @@ from __future__ import print_function import os +import sys from twisted.trial import unittest import deluge.component as component import deluge.core.torrent import deluge.tests.common as common -import test_torrent from deluge._libtorrent import lt from deluge.core.core import Core from deluge.core.rpcserver import RPCServer @@ -41,7 +41,7 @@ class TorrentTestCase(unittest.TestCase): def setUp(self): # Save component and set back on teardown self.original_component = deluge.core.torrent.component - deluge.core.torrent.component = test_torrent + deluge.core.torrent.component = sys.modules[__name__] self.setup_config() global rpcserver global core