aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-14 21:45:09 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-14 21:45:09 -0800
commit30bdb1b0ba28b2e4a81aa7209d294c224d8a2245 (patch)
tree8556d05fef32c06ad8ad8b3b61649e8febae415f /python/tests
parent18c1434319ed7be67d11b47ea7c5d1393caba193 (diff)
downloadfatcat-30bdb1b0ba28b2e4a81aa7209d294c224d8a2245.tar.gz
fatcat-30bdb1b0ba28b2e4a81aa7209d294c224d8a2245.zip
update crossref controlled vocab
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/import_crossref.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/tests/import_crossref.py b/python/tests/import_crossref.py
index ab33d0fc..078db184 100644
--- a/python/tests/import_crossref.py
+++ b/python/tests/import_crossref.py
@@ -17,6 +17,12 @@ def test_crossref_importer(crossref_importer):
with open('tests/files/crossref-works.2018-01-21.badsample.json', 'r') as f:
crossref_importer.process_source(f)
+def test_crossref_mappings(crossref_importer):
+ assert crossref_importer.map_release_type('journal-article') == "article-journal"
+ assert crossref_importer.map_release_type('asdf') is None
+ assert crossref_importer.map_release_type('component') is None
+ assert crossref_importer.map_release_type('standard') == 'standard'
+
def test_crossref_importer_create(crossref_importer):
crossref_importer.create_containers = True
with open('tests/files/crossref-works.2018-01-21.badsample.json', 'r') as f:
@@ -33,7 +39,7 @@ def test_crossref_dict_parse(crossref_importer):
assert r.publisher == "Wiley-Blackwell"
print(extra)
assert extra['container-title'] == ["International Journal of Quantum Chemistry"]
- assert r.release_type == "journal-article"
+ assert r.release_type == "article-journal"
assert r.release_status == "published"
assert r.isbn13 == "978-3-16-148410-0"
assert 'subtitle' not in extra