Commit 986cb953 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by ntome

piratebay: flake8 / Python 3 compatibility

parent fa3bdce4
......@@ -17,20 +17,21 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.test import BackendTest
from weboob.capabilities.torrent import MagnetOnly
from random import choice
from weboob.capabilities.torrent import MagnetOnly
from weboob.tools.compat import basestring
from weboob.tools.test import BackendTest
class PiratebayTest(BackendTest):
MODULE = 'piratebay'
def test_torrent(self):
# try something popular so we sometimes get a magnet-only torrent
l = list(self.backend.iter_torrents('ubuntu linux'))
if len(l):
torrent = choice(l)
torrents = list(self.backend.iter_torrents('ubuntu linux'))
if len(torrents):
torrent = choice(torrents)
full_torrent = self.backend.get_torrent(torrent.id)
assert torrent.name
assert full_torrent.name == torrent.name
......
......@@ -108,8 +108,9 @@ pap
pariskiwi
paroles2chansons
parolesmania
pastebin
pastealacon
pastebin
piratebay
pixtoilelibre
podnapisi
popolemploi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment