fixed generic comic reader tests

This commit is contained in:
Noé Rubinstein 2011-09-04 11:55:28 +02:00 committed by Romain Bignon
commit b873878e31
8 changed files with 16 additions and 9 deletions

View file

@ -21,5 +21,6 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class BatotoTest(GenericComicReaderTest):
BACKEND = 'batoto'
DOWNLOAD_ID = '26287/yurumates_ch4_by_primitive-scans'
def test_download(self):
return self._test_download('26287/yurumates_ch4_by_primitive-scans')

View file

@ -21,5 +21,6 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class EatmangaTest(GenericComicReaderTest):
BACKEND = 'eatmanga'
DOWNLOAD_ID = 'Glass-Mask/Glass-Mask-Vol-031'
def test_download(self):
return self._test_download('Glass-Mask/Glass-Mask-Vol-031')

View file

@ -22,4 +22,5 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class MangafoxTest(GenericComicReaderTest):
BACKEND = 'mangafox'
DOWNLOAD_ID = 'glass_no_kamen/v02/c000'
def test_download(self):
return self._test_download('glass_no_kamen/v02/c000')

View file

@ -21,5 +21,6 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class MangahereTest(GenericComicReaderTest):
BACKEND = 'mangahere'
DOWNLOAD_ID = 'glass_no_kamen/v02/c000'
def test_download(self):
return self._test_download('glass_no_kamen/v02/c000')

View file

@ -21,5 +21,6 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class MangareaderTest(GenericComicReaderTest):
BACKEND = 'mangareader'
DOWNLOAD_ID = 'glass-mask/3'
def test_download(self):
return self._test_download('glass-mask/3')

View file

@ -21,5 +21,6 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class MangatoshokanTest(GenericComicReaderTest):
BACKEND = 'mangatoshokan'
DOWNLOAD_ID = 'Okujyouhime/Extras/5'
def test_download(self):
return self._test_download('Okujyouhime/Extras/5')

View file

@ -21,5 +21,6 @@ from weboob.tools.capabilities.gallery.genericcomicreader import GenericComicRea
class SimplyreaditTest(GenericComicReaderTest):
BACKEND = 'simplyreadit'
DOWNLOAD_ID = 'bonnouji/en/1/3'
def test_download(self):
return self._test_download('bonnouji/en/1/3')

View file

@ -114,8 +114,8 @@ class GenericComicReaderBackend(BaseBackend, ICapGallery):
class GenericComicReaderTest(BackendTest):
def test_download(self):
g = self.backend.get_gallery(self.DOWNLOAD_ID)
def _test_download(self, _id):
g = self.backend.get_gallery(_id)
it = self.backend.iter_gallery_images(g)
it.next()
img = it.next()