fix module-names for extractor tests

This commit is contained in:
Mike Fährmann
2016-07-23 17:50:42 +02:00
parent de9aa8f310
commit 57a12f5be0
2 changed files with 8 additions and 8 deletions

View File

@@ -10,7 +10,7 @@
"""Create testdata for extractor tests"""
import argparse
from gallery_dl import jobs, config
from gallery_dl import job, config
TESTDATA_FMT = """
test = [("{}", {{
@@ -28,11 +28,11 @@ def main():
config.load()
for url in args.urls:
job = jobs.HashJob(url, content=args.content)
job.run()
print(job.extractor.__class__.__name__)
print(TESTDATA_FMT.format(url, job.hash_url.hexdigest(),
job.hash_keyword.hexdigest(), job.hash_content.hexdigest()))
hjob = job.HashJob(url, content=args.content)
hjob.run()
print(hjob.extractor.__class__.__name__)
print(TESTDATA_FMT.format(url, hjob.hash_url.hexdigest(),
hjob.hash_keyword.hexdigest(), hjob.hash_content.hexdigest()))
if __name__ == '__main__':
main()

View File

@@ -8,7 +8,7 @@
# published by the Free Software Foundation.
import unittest
from gallery_dl import extractor, jobs, config, cache
from gallery_dl import extractor, job, config, cache
class TestExtractors(unittest.TestCase):
@@ -17,7 +17,7 @@ class TestExtractors(unittest.TestCase):
config.set(("cache", "file"), ":memory:")
def run_test(self, extr, url, result):
hjob = jobs.HashJob(url, "content" in result)
hjob = job.HashJob(url, "content" in result)
self.assertEqual(extr, hjob.extractor.__class__)
hjob.run()
if "url" in result: