[imagefap] update unit tests

old gallery/image has been deleted
This commit is contained in:
Mike Fährmann
2017-10-26 15:27:42 +02:00
parent caf26412dd
commit 035ef655f1
4 changed files with 15 additions and 12 deletions

View File

@@ -10,7 +10,7 @@
"""Create testdata for extractor tests"""
import argparse
from gallery_dl import job, config, extractor
from gallery_dl import job, config, extractor
TESTDATA_FMT = """
test = [("{}", {{
@@ -26,6 +26,7 @@ TESTDATA_EXCEPTION_FMT = """
}})]
"""
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--content", action="store_true")
@@ -43,6 +44,7 @@ def main():
urls = args.urls
config.load()
config.set(("downloader", "part"), False)
for url in urls:
tjob = job.TestJob(url, content=args.content)
try:
@@ -58,5 +60,6 @@ def main():
print(tjob.extractor.__class__.__name__)
print(fmt.format(url, *data))
if __name__ == '__main__':
main()