Commit 96e706db authored by Christophe Benz's avatar Christophe Benz Committed by Romain Bignon

use simpler form for iter to list

parent 1716a738
......@@ -29,5 +29,5 @@ class AuMTest(BackendTest):
for message in self.backend.iter_unread_messages():
pass
contacts = [c for c in self.backend.iter_contacts()]
contacts = list(self.backend.iter_contacts())
self.backend.fillobj(contacts[0], ['photos', 'profile'])
......@@ -22,8 +22,8 @@ class BNPorcTest(BackendTest):
BACKEND = 'bnporc'
def test_bnporc(self):
l = [a for a in self.backend.iter_accounts()]
l = list(self.backend.iter_accounts())
if len(l) > 0:
a = l[0]
[o for o in self.backend.iter_operations(a)]
[o for o in self.backend.iter_history(a)]
list(self.backend.iter_operations(a))
list(self.backend.iter_history(a))
......@@ -22,7 +22,7 @@ class CanalTPTest(BackendTest):
BACKEND = 'canaltp'
def test_canaltp(self):
stations = [s for s in self.backend.iter_station_search('defense')]
stations = list(self.backend.iter_station_search('defense'))
self.assertTrue(len(stations) > 0)
[d for d in self.backend.iter_station_departures(stations[0].id)]
list(self.backend.iter_station_departures(stations[0].id))
......@@ -21,6 +21,6 @@ class GazelleTest(BackendTest):
BACKEND = 'gazelle'
def test_torrent(self):
l = [torrent for torrent in self.backend.iter_torrents('sex')]
l = list(self.backend.iter_torrents('sex'))
if len(l) > 0:
self.backend.get_torrent_file(l[0].id)
......@@ -22,7 +22,7 @@ class TransilienTest(BackendTest):
BACKEND = 'transilien'
def test_transilien(self):
stations = [s for s in self.backend.iter_station_search('defense')]
stations = list(self.backend.iter_station_search('defense'))
self.assertTrue(len(stations) > 0)
[d for d in self.backend.iter_station_departures(stations[0].id)]
list(self.backend.iter_station_departures(stations[0].id))
......@@ -24,7 +24,7 @@ class YoujizzTest(BackendTest):
def test_youjizz(self):
self.assertTrue(len(self.backend.iter_search_results('anus', nsfw=False)) == 0)
l = [v for v in self.backend.iter_search_results('futanari', nsfw=True)]
l = list(self.backend.iter_search_results('futanari', nsfw=True))
self.assertTrue(len(l) > 0)
v = l[0]
self.backend.fillobj(v, ('url',))
......
......@@ -24,7 +24,7 @@ class YoupornTest(BackendTest):
def test_youporn(self):
self.assertTrue(len(self.backend.iter_search_results('penis', nsfw=False)) == 0)
l = [v for v in self.backend.iter_search_results('ass to mouth', nsfw=True)]
l = list(self.backend.iter_search_results('ass to mouth', nsfw=True))
self.assertTrue(len(l) > 0)
v = l[0]
self.backend.fillobj(v, ('url',))
......
......@@ -22,7 +22,7 @@ class YoutubeTest(BackendTest):
BACKEND = 'youtube'
def test_youtube(self):
l = [v for v in self.backend.iter_search_results('lol')]
l = list(self.backend.iter_search_results('lol'))
self.assertTrue(len(l) > 0)
v = l[0]
self.backend.fillobj(v, ('url',))
......
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