summaryrefslogtreecommitdiffstats
path: root/deluge/tests/test_torrent.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2014-02-13 18:45:47 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2014-02-15 09:26:08 +0000
commita9ed6fe46af13ac33a431d83b1b60ced6d6186ec (patch)
treef843c6428fac0ed8421e15f1ad8e7651494bfe9b /deluge/tests/test_torrent.py
parent1d68579b57980e23f4171de26e8c4899f790f0ec (diff)
downloaddeluge-a9ed6fe46af13ac33a431d83b1b60ced6d6186ec.tar.gz
deluge-a9ed6fe46af13ac33a431d83b1b60ced6d6186ec.tar.bz2
deluge-a9ed6fe46af13ac33a431d83b1b60ced6d6186ec.zip
refactor torrent.set_options
Diffstat (limited to 'deluge/tests/test_torrent.py')
-rw-r--r--deluge/tests/test_torrent.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/deluge/tests/test_torrent.py b/deluge/tests/test_torrent.py
index 1823bd3d7..2e7f11b7c 100644
--- a/deluge/tests/test_torrent.py
+++ b/deluge/tests/test_torrent.py
@@ -78,19 +78,19 @@ class TorrentTestCase(unittest.TestCase):
atp["duplicate_is_error"] = True
return atp
- def test_set_prioritize_first_last(self):
+ def test_set_prioritize_first_last_pieces(self):
piece_indexes = [(0, 1), (0, 1), (0, 1), (0, 1), (0, 2), (50, 52),
(51, 53), (110, 112), (111, 114), (200, 203),
(202, 203), (212, 213), (212, 218), (457, 463)]
- self.run_test_set_prioritize_first_last("dir_with_6_files.torrent", piece_indexes)
+ self.run_test_set_prioritize_first_last_pieces("dir_with_6_files.torrent", piece_indexes)
- def run_test_set_prioritize_first_last(self, torrent_file, prioritized_piece_indexes):
+ def run_test_set_prioritize_first_last_pieces(self, torrent_file, prioritized_piece_indexes):
atp = self.get_torrent_atp(torrent_file)
handle = self.session.add_torrent(atp)
self.torrent = Torrent(handle, {})
priorities_original = handle.piece_priorities()
- prioritized_pieces, new_priorites = self.torrent.set_prioritize_first_last(True)
+ prioritized_pieces, new_priorites = self.torrent.set_prioritize_first_last_pieces(True)
priorities = handle.piece_priorities()
non_prioritized_pieces = list(range(len(priorities)))
@@ -113,14 +113,14 @@ class TorrentTestCase(unittest.TestCase):
#self.print_priority_list(priorities)
- def test_set_prioritize_first_last_false(self):
+ def test_set_prioritize_first_last_pieces_false(self):
atp = self.get_torrent_atp("dir_with_6_files.torrent")
handle = self.session.add_torrent(atp)
self.torrent = Torrent(handle, {})
# First set some pieces prioritized
- self.torrent.set_prioritize_first_last(True)
+ self.torrent.set_prioritize_first_last_pieces(True)
# Reset pirorities
- self.torrent.set_prioritize_first_last(False)
+ self.torrent.set_prioritize_first_last_pieces(False)
priorities = handle.piece_priorities()
# Test the priority of the prioritized pieces