Switch tests to a unique comic name.

This commit is contained in:
Tobias Gruetzmacher 2015-04-18 12:34:33 +02:00
parent e8af5adcb8
commit 89ada9de7e
2 changed files with 5 additions and 4 deletions

View file

@ -38,7 +38,7 @@ class TestDosage (unittest.TestCase):
for option in ("-h", "--help"): for option in ("-h", "--help"):
run_with_options([option]) run_with_options([option])
# module help # module help
run_with_options(["-m", "calvinandhobbes"]) run_with_options(["-m", "xkcd"])
# no comics specified # no comics specified
self.assertRaises(OSError, run_with_options, []) self.assertRaises(OSError, run_with_options, [])
# unknown option # unknown option
@ -49,7 +49,7 @@ class TestDosage (unittest.TestCase):
tmpdir = tempfile.mkdtemp() tmpdir = tempfile.mkdtemp()
try: try:
# fetch html and rss # fetch html and rss
run_with_options(["-n", "2", "-v", "-b", tmpdir, "-o", "html", "-o", "rss", "calvinandhobbes"]) run_with_options(["-n", "2", "-v", "-b", tmpdir, "-o", "html", "-o", "rss", "xkcd"])
finally: finally:
shutil.rmtree(tmpdir) shutil.rmtree(tmpdir)
# create a temporary directory for images # create a temporary directory for images
@ -63,6 +63,6 @@ class TestDosage (unittest.TestCase):
tmpdir = tempfile.mkdtemp() tmpdir = tempfile.mkdtemp()
try: try:
# fetch indexed # fetch indexed
run_with_options(["-n", "2", "-v", "-b", tmpdir, "calvinandhobbes:2012/02/02"]) run_with_options(["-n", "2", "-v", "-b", tmpdir, "xkcd:303"])
finally: finally:
shutil.rmtree(tmpdir) shutil.rmtree(tmpdir)

View file

@ -1,5 +1,6 @@
# -*- coding: iso-8859-1 -*- # -*- coding: iso-8859-1 -*-
# Copyright (C) 2013-2014 Bastian Kleineidam # Copyright (C) 2013-2014 Bastian Kleineidam
# Copyright (C) 2015 Tobias Gruetzmacher
from unittest import TestCase from unittest import TestCase
from dosagelib import scraper from dosagelib import scraper
@ -15,7 +16,7 @@ class ScraperTester(TestCase):
"missing url in %s" % scraperobj.getName()) "missing url in %s" % scraperobj.getName())
def test_find_scraperclasses_single(self): def test_find_scraperclasses_single(self):
result = scraper.find_scraperclasses("CalvinAndHobbes") result = scraper.find_scraperclasses("xkcd")
self.assertEqual(len(result), 1) self.assertEqual(len(result), 1)
def test_find_scraperclasses_multi(self): def test_find_scraperclasses_multi(self):