diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-20 19:55:53 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-20 19:55:53 -0700 |
commit | 7ebe32a290aa160c43671c21e968d1614a878f02 (patch) | |
tree | b1564665c7566b7b1d82fbac91162a9bf1b9e0bf /python/tests/importer.py | |
parent | 907a9d3b5882ec12b2c8c0563a7ed08be0edf022 (diff) | |
download | fatcat-7ebe32a290aa160c43671c21e968d1614a878f02.tar.gz fatcat-7ebe32a290aa160c43671c21e968d1614a878f02.zip |
importer tests and fixes
Diffstat (limited to 'python/tests/importer.py')
-rw-r--r-- | python/tests/importer.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/python/tests/importer.py b/python/tests/importer.py new file mode 100644 index 00000000..190acbed --- /dev/null +++ b/python/tests/importer.py @@ -0,0 +1,15 @@ + + +import pytest +from fatcat.importer_common import FatcatImporter + + +def test_issnl_mapping_lookup(): + with open('tests/files/ISSN-to-ISSN-L.snip.txt', 'r') as issn_file: + fi = FatcatImporter("http://localhost:9411/v0", issn_file) + + assert fi.issn2issnl('0000-0027') == '0002-0027' + assert fi.issn2issnl('0002-0027') == '0002-0027' + assert fi.issn2issnl('9999-0027') == None + + assert fi.lookup_issnl('9999-9999') == None |