btmon speeded up, all ICapTorrent backends clarified and fillobj cleaned

This commit is contained in:
Julien Veyssier 2013-03-15 18:20:54 +01:00
commit b907c8b266
10 changed files with 101 additions and 39 deletions

View file

@ -19,10 +19,16 @@
from weboob.tools.test import BackendTest
from random import choice
class IsohuntTest(BackendTest):
BACKEND = 'isohunt'
def test_torrent(self):
l = list(self.backend.iter_torrents('debian'))
if len(l) > 0:
self.backend.get_torrent_file(l[0].id)
if len(l):
torrent = choice(l)
full_torrent = self.backend.get_torrent(torrent.id)
assert torrent.name
assert full_torrent.name
assert self.backend.get_torrent_file(torrent.id)