Add a test to ckeck that renamed comics point to existing comics
This commit is contained in:
parent
e1f712d194
commit
d0bc0572c2
2 changed files with 13 additions and 3 deletions
|
@ -222,10 +222,12 @@ class Removed(Scraper):
|
||||||
cls('GoComics/AdventuresofMartyandTurkey'),
|
cls('GoComics/AdventuresofMartyandTurkey'),
|
||||||
cls('GoComics/AdventuresofMikeAndSimon'),
|
cls('GoComics/AdventuresofMikeAndSimon'),
|
||||||
cls('GoComics/AgentGates'),
|
cls('GoComics/AgentGates'),
|
||||||
|
cls('GoComics/AlisonWard'),
|
||||||
cls('GoComics/AmaZnEvents'),
|
cls('GoComics/AmaZnEvents'),
|
||||||
cls('GoComics/AnythingGoes'),
|
cls('GoComics/AnythingGoes'),
|
||||||
cls('GoComics/BCEnEspaol'),
|
cls('GoComics/BCEnEspaol'),
|
||||||
cls('GoComics/BenAndSeymour'),
|
cls('GoComics/BenAndSeymour'),
|
||||||
|
cls('GoComics/BeneaththeFerns'),
|
||||||
cls('GoComics/BenSargent'),
|
cls('GoComics/BenSargent'),
|
||||||
cls('GoComics/BERSERKALERT'),
|
cls('GoComics/BERSERKALERT'),
|
||||||
cls('GoComics/BestInShow'),
|
cls('GoComics/BestInShow'),
|
||||||
|
@ -604,14 +606,12 @@ class Renamed(Scraper):
|
||||||
cls('FoulLanguage', 'GoComics/FowlLanguage'),
|
cls('FoulLanguage', 'GoComics/FowlLanguage'),
|
||||||
cls('GoComics/060', 'ComicSherpa/060'),
|
cls('GoComics/060', 'ComicSherpa/060'),
|
||||||
cls('GoComics/ABitSketch', 'ComicSherpa/ABitSketch'),
|
cls('GoComics/ABitSketch', 'ComicSherpa/ABitSketch'),
|
||||||
cls('GoComics/AlisonWard', 'ComicSherpa/AlisonWard'),
|
|
||||||
cls('GoComics/Andnow', 'ComicSherpa/AndNow'),
|
cls('GoComics/Andnow', 'ComicSherpa/AndNow'),
|
||||||
cls('GoComics/Anecdote', 'ComicSherpa/Anecdote'),
|
cls('GoComics/Anecdote', 'ComicSherpa/Anecdote'),
|
||||||
cls('GoComics/AppleCreekComics', 'ComicSherpa/AppleCreekComics'),
|
cls('GoComics/AppleCreekComics', 'ComicSherpa/AppleCreekComics'),
|
||||||
cls('GoComics/BarkingCrayon', 'ComicFury/BarkingCrayon'),
|
cls('GoComics/BarkingCrayon', 'ComicFury/BarkingCrayon'),
|
||||||
cls('GoComics/BatchRejection', 'ComicSherpa/BatchRejection'),
|
cls('GoComics/BatchRejection', 'ComicSherpa/BatchRejection'),
|
||||||
cls('GoComics/Bazoobee', 'ComicSherpa/Bazoobee'),
|
cls('GoComics/Bazoobee', 'ComicSherpa/Bazoobee'),
|
||||||
cls('GoComics/BeneaththeFerns', 'ComicSherpa/BeneathTheFerns'),
|
|
||||||
cls('GoComics/Bluebonnets', 'ComicSherpa/Bluebonnets'),
|
cls('GoComics/Bluebonnets', 'ComicSherpa/Bluebonnets'),
|
||||||
cls('GoComics/BlueSkiesToons', 'ComicSherpa/BlueSkiesToons'),
|
cls('GoComics/BlueSkiesToons', 'ComicSherpa/BlueSkiesToons'),
|
||||||
cls('GoComics/BottAuto', 'ComicSherpa/BottAuto'),
|
cls('GoComics/BottAuto', 'ComicSherpa/BottAuto'),
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
||||||
# Copyright (C) 2012-2014 Bastian Kleineidam
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
||||||
# Copyright (C) 2015-2017 Tobias Gruetzmacher
|
# Copyright (C) 2015-2019 Tobias Gruetzmacher
|
||||||
|
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from dosagelib import scraper
|
from dosagelib import scraper
|
||||||
|
from dosagelib.plugins import old
|
||||||
|
|
||||||
|
|
||||||
class TestComicNames(object):
|
class TestComicNames(object):
|
||||||
|
@ -21,3 +22,12 @@ class TestComicNames(object):
|
||||||
else:
|
else:
|
||||||
comicname = name
|
comicname = name
|
||||||
assert re.sub("[^0-9a-zA-Z_]", "", comicname) == comicname
|
assert re.sub("[^0-9a-zA-Z_]", "", comicname) == comicname
|
||||||
|
|
||||||
|
def test_renamed(self):
|
||||||
|
for scraperobj in scraper.get_scrapers(include_removed=True):
|
||||||
|
if not isinstance(scraperobj, old.Renamed):
|
||||||
|
continue
|
||||||
|
assert len(scraperobj.getDisabledReasons()) > 0
|
||||||
|
# Renamed scraper should only point to an non-disabled scraper
|
||||||
|
newscraper = scraper.find_scrapers(scraperobj.newname)[0]
|
||||||
|
assert len(newscraper.getDisabledReasons()) == 0
|
||||||
|
|
Loading…
Reference in a new issue