diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-22 12:53:20 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 00:30:10 +0000 |
commit | beb4f8c8f9f3cc9a1c2d9db9bc05afe4835b1b32 (patch) | |
tree | 72426ea13bcd3746c415292df01874757fea8fb6 /deluge/tests/test_torrent.py | |
parent | 3b1eeb0818ff1c39658622c0b378e8f20aa81722 (diff) | |
download | deluge-beb4f8c8f9f3cc9a1c2d9db9bc05afe4835b1b32.tar.gz deluge-beb4f8c8f9f3cc9a1c2d9db9bc05afe4835b1b32.tar.bz2 deluge-beb4f8c8f9f3cc9a1c2d9db9bc05afe4835b1b32.zip |
[Common] Rename decode_string to decode_bytes
- Switch to using Python 3 naming convention where str now refers to unicode
and bytes are encoded strings.
- Cleanup docs and code
- Also rename convert_to_utf8 to utf8_encode_structure to clarify functionality.
Diffstat (limited to 'deluge/tests/test_torrent.py')
-rw-r--r-- | deluge/tests/test_torrent.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/deluge/tests/test_torrent.py b/deluge/tests/test_torrent.py index db38701d6..680eddd52 100644 --- a/deluge/tests/test_torrent.py +++ b/deluge/tests/test_torrent.py @@ -18,7 +18,7 @@ import deluge.component as component import deluge.core.torrent import deluge.tests.common as common from deluge._libtorrent import lt -from deluge.common import convert_to_utf8 +from deluge.common import utf8_encode_structure from deluge.core.core import Core from deluge.core.rpcserver import RPCServer from deluge.core.torrent import Torrent @@ -180,7 +180,7 @@ class TorrentTestCase(BaseTestCase): filename = common.get_test_data_file('test_torrent.file.torrent') with open(filename) as _file: filedump = _file.read() - resume_data = convert_to_utf8(resume_data) + resume_data = utf8_encode_structure(resume_data) torrent_id = yield self.core.torrentmanager.add(state=torrent_state, filedump=filedump, resume_data=lt.bencode(resume_data)) torrent = self.core.torrentmanager.torrents[torrent_id] |