From 9ab88508ed710de9db06a27436042ac30a70676e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 22 Jan 2019 16:27:27 -0800 Subject: crossref importer updates --- python/tests/api_releases.py | 2 +- python/tests/files/crossref-works.single.json | 2 +- python/tests/import_crossref.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'python/tests') diff --git a/python/tests/api_releases.py b/python/tests/api_releases.py index d5b31ad3..36774745 100644 --- a/python/tests/api_releases.py +++ b/python/tests/api_releases.py @@ -19,7 +19,7 @@ def test_release(api): original_title="оригинальное название", release_type="post-weblog", release_status="pre-print", - #release_date=datetime.datetime.utcnow(), + # XXX: release_date=datetime.datetime.utcnow(), release_year=2015, doi="10.5555/12345678", pmid="12345", diff --git a/python/tests/files/crossref-works.single.json b/python/tests/files/crossref-works.single.json index 2af2b358..e3d2e05c 100644 --- a/python/tests/files/crossref-works.single.json +++ b/python/tests/files/crossref-works.single.json @@ -84,7 +84,7 @@ { "given": "Carlos G.", "family": "Diaz", - "affiliation": ["Some University"] + "affiliation": [{"name": "Some University"}, {"name": "Some Department"}] }, { "given": "Francisco M.", diff --git a/python/tests/import_crossref.py b/python/tests/import_crossref.py index e2ca6122..89ce9fc9 100644 --- a/python/tests/import_crossref.py +++ b/python/tests/import_crossref.py @@ -61,7 +61,8 @@ def test_crossref_dict_parse(crossref_importer): assert len(r.contribs) == 5 assert r.contribs[0].raw_name == "Marcelo D. Radicioni" assert r.contribs[0].index == 0 - assert r.contribs[1].extra['affiliations'] == ["Some University"] + assert r.contribs[1].raw_affiliation == "Some University" + assert r.contribs[1].extra['affiliations'] == ["Some Department"] assert r.contribs[1].role == "author" assert r.contribs[3].role == "editor" assert r.contribs[3].index is None -- cgit v1.2.3