Rename get_scrapers to get_scraperclasses
This commit is contained in:
parent
6e0ffa0619
commit
d3727a3d4e
2 changed files with 3 additions and 3 deletions
|
@ -289,7 +289,7 @@ def get_results():
|
||||||
def has_comic(name):
|
def has_comic(name):
|
||||||
"""Check if comic name already exists."""
|
"""Check if comic name already exists."""
|
||||||
cname = name.lower()
|
cname = name.lower()
|
||||||
for scraperclass in get_scrapers():
|
for scraperclass in get_scraperclasses():
|
||||||
lname = scraperclass.get_name().lower()
|
lname = scraperclass.get_name().lower()
|
||||||
if lname == cname:
|
if lname == cname:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -92,9 +92,9 @@ def generate_comic_testers():
|
||||||
# optional: limit number of scraper tests
|
# optional: limit number of scraper tests
|
||||||
max_scrapers = 0
|
max_scrapers = 0
|
||||||
if max_scrapers:
|
if max_scrapers:
|
||||||
scrapers = islice(scraper.get_scrapers(), 0, max_scrapers)
|
scrapers = islice(scraper.get_scraperclasses(), 0, max_scrapers)
|
||||||
else:
|
else:
|
||||||
scrapers = scraper.get_scrapers()
|
scrapers = scraper.get_scraperclasses()
|
||||||
for scraperclass in scrapers:
|
for scraperclass in scrapers:
|
||||||
name = 'Test'+scraperclass.__name__
|
name = 'Test'+scraperclass.__name__
|
||||||
g[name] = make_comic_tester(name, scraperclass=scraperclass)
|
g[name] = make_comic_tester(name, scraperclass=scraperclass)
|
||||||
|
|
Loading…
Reference in a new issue