Commit cbb84956 authored by ntome's avatar ntome

python3: avoid urllib in modules

Ok, splitquery is not equivalent to partition, but i'm lazy now.
parent 19708e42
Pipeline #2654 failed with stages
in 55 seconds
......@@ -20,7 +20,6 @@
from weboob.tools.test import BackendTest
from weboob.capabilities.base import NotLoaded
import urllib
from random import choice
......@@ -30,7 +29,7 @@ class CpasbienTest(BackendTest):
def test_torrent(self):
torrents = list(self.backend.iter_torrents('spiderman'))
for torrent in torrents:
path, qs = urllib.splitquery(torrent.url)
path, _, qs = torrent.url.partition('?')
assert path.endswith('.torrent')
if qs:
assert torrent.filename
......
......@@ -20,7 +20,6 @@
from weboob.tools.test import BackendTest
from weboob.capabilities.base import NotLoaded
import urllib
from random import choice
......@@ -30,7 +29,7 @@ class KickassTest(BackendTest):
def test_torrent(self):
torrents = list(self.backend.iter_torrents('debian'))
for torrent in torrents:
path, qs = urllib.splitquery(torrent.url)
path, _, qs = torrent.url.partition('?')
assert path.endswith('.torrent')
if qs:
assert torrent.filename
......
......@@ -20,7 +20,6 @@
from weboob.tools.test import BackendTest
from weboob.capabilities.base import NotLoaded
import urllib
from random import choice
......@@ -30,7 +29,7 @@ class T411Test(BackendTest):
def test_torrent(self):
torrents = list(self.backend.iter_torrents('spiderman'))[:10]
for torrent in torrents:
path, qs = urllib.splitquery(torrent.url)
path, _, qs = torrent.url.partition('?')
assert torrent.id
assert path.endswith(torrent.name)
assert torrent.name
......
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