diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-10-22 20:17:06 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-10-22 20:17:06 -0700 |
commit | 498677bbe0a04af2ca527bdff83d02bb0710dac9 (patch) | |
tree | 56d81229be53955ca5b2d1ad28602f5f46db65bf /tests/test_work_pipeline.py | |
parent | 65f880565d462950f4bcc10e77ad423d6cc3bf65 (diff) | |
download | fatcat-scholar-498677bbe0a04af2ca527bdff83d02bb0710dac9.tar.gz fatcat-scholar-498677bbe0a04af2ca527bdff83d02bb0710dac9.zip |
improve test coverage
Diffstat (limited to 'tests/test_work_pipeline.py')
-rw-r--r-- | tests/test_work_pipeline.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_work_pipeline.py b/tests/test_work_pipeline.py new file mode 100644 index 0000000..439a186 --- /dev/null +++ b/tests/test_work_pipeline.py @@ -0,0 +1,26 @@ +from fatcat_scholar.issue_db import IssueDB +from fatcat_scholar.sandcrawler import ( + SandcrawlerPostgrestClient, + SandcrawlerMinioClient, +) +from fatcat_scholar.work_pipeline import * +from fatcat_scholar.config import settings + + +def test_run_transform() -> None: + + issue_db = IssueDB(settings.SCHOLAR_ISSUEDB_PATH) + issue_db.init_db() + + wp = WorkPipeline( + issue_db=issue_db, + sandcrawler_db_client=SandcrawlerPostgrestClient( + api_url=settings.SANDCRAWLER_DB_API + ), + sandcrawler_s3_client=SandcrawlerMinioClient( + host_url=settings.SANDCRAWLER_S3_API + ), + ) + + with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4_sans.json", "r") as f: + wp.run_releases(f.readlines()) |