diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-22 16:27:27 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-22 16:27:27 -0800 |
commit | 9ab88508ed710de9db06a27436042ac30a70676e (patch) | |
tree | 47c0c8b7a15eaf88eb7472944d21f4b328b4de94 /python/tests | |
parent | c6444a6ebee4a541735705e10885067e6d012df1 (diff) | |
download | fatcat-9ab88508ed710de9db06a27436042ac30a70676e.tar.gz fatcat-9ab88508ed710de9db06a27436042ac30a70676e.zip |
crossref importer updates
Diffstat (limited to 'python/tests')
-rw-r--r-- | python/tests/api_releases.py | 2 | ||||
-rw-r--r-- | python/tests/files/crossref-works.single.json | 2 | ||||
-rw-r--r-- | python/tests/import_crossref.py | 3 |
3 files changed, 4 insertions, 3 deletions
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 |