summaryrefslogtreecommitdiffstats
path: root/deluge/tests/test_torrent.py
diff options
context:
space:
mode:
authorbendikro <bro.devel+deluge@gmail.com>2016-06-09 14:23:20 +0200
committerCalum Lind <calumlind+deluge@gmail.com>2016-10-18 21:26:36 +0100
commitd505ebe92634733152522f4f3c595362d39977a8 (patch)
tree41e61851811f8c00e5601f8a94da1c81008ea1e3 /deluge/tests/test_torrent.py
parentc8a3fd72d411bfbb6258490bbd3b65a253fba983 (diff)
downloaddeluge-d505ebe92634733152522f4f3c595362d39977a8.tar.gz
deluge-d505ebe92634733152522f4f3c595362d39977a8.tar.bz2
deluge-d505ebe92634733152522f4f3c595362d39977a8.zip
[Tests] Use common.rpath() in all tests
Diffstat (limited to 'deluge/tests/test_torrent.py')
-rw-r--r--deluge/tests/test_torrent.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/deluge/tests/test_torrent.py b/deluge/tests/test_torrent.py
index f477c2251..572e1afa5 100644
--- a/deluge/tests/test_torrent.py
+++ b/deluge/tests/test_torrent.py
@@ -52,7 +52,7 @@ class TorrentTestCase(BaseTestCase):
self.assertEquals(torrent.state, state)
def get_torrent_atp(self, filename):
- filename = os.path.join(os.path.dirname(__file__), filename)
+ filename = common.rpath(filename)
with open(filename, 'rb') as _file:
info = lt.torrent_info(lt.bdecode(_file.read()))
atp = {"ti": info}
@@ -117,7 +117,7 @@ class TorrentTestCase(BaseTestCase):
@defer.inlineCallbacks
def test_torrent_error_data_missing(self):
options = {"seed_mode": True}
- filename = os.path.join(os.path.dirname(__file__), "test_torrent.file.torrent")
+ filename = common.rpath("test_torrent.file.torrent")
with open(filename) as _file:
filedump = base64.encodestring(_file.read())
torrent_id = yield self.core.add_torrent_file(filename, filedump, options)
@@ -133,7 +133,7 @@ class TorrentTestCase(BaseTestCase):
@defer.inlineCallbacks
def test_torrent_error_resume_original_state(self):
options = {"seed_mode": True, "add_paused": True}
- filename = os.path.join(os.path.dirname(__file__), "test_torrent.file.torrent")
+ filename = common.rpath("test_torrent.file.torrent")
with open(filename) as _file:
filedump = base64.encodestring(_file.read())
torrent_id = yield self.core.add_torrent_file(filename, filedump, options)
@@ -178,7 +178,7 @@ class TorrentTestCase(BaseTestCase):
is_finished=True,
)
- filename = os.path.join(os.path.dirname(__file__), "test_torrent.file.torrent")
+ filename = common.rpath("test_torrent.file.torrent")
with open(filename) as _file:
filedump = _file.read()
torrent_id = yield self.core.torrentmanager.add(state=torrent_state, filedump=filedump,