diff --git a/test/create_test_data.py b/test/create_test_data.py index 89a31e8d..25db6c48 100644 --- a/test/create_test_data.py +++ b/test/create_test_data.py @@ -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() diff --git a/test/test_extractors.py b/test/test_extractors.py index bdb68d67..0e201e94 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -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: