aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-20 19:55:53 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-20 19:55:53 -0700
commit7ebe32a290aa160c43671c21e968d1614a878f02 (patch)
treeb1564665c7566b7b1d82fbac91162a9bf1b9e0bf /python
parent907a9d3b5882ec12b2c8c0563a7ed08be0edf022 (diff)
downloadfatcat-7ebe32a290aa160c43671c21e968d1614a878f02.tar.gz
fatcat-7ebe32a290aa160c43671c21e968d1614a878f02.zip
importer tests and fixes
Diffstat (limited to 'python')
-rw-r--r--python/fatcat/crossref_importer.py1
-rw-r--r--python/fatcat/importer_common.py2
-rw-r--r--python/tests/files/ISSN-to-ISSN-L.snip.txt18
-rw-r--r--python/tests/files/crossref-works.2018-01-21.badsample.json2
-rw-r--r--python/tests/importer.py15
-rw-r--r--python/tests/routes.py3
6 files changed, 30 insertions, 11 deletions
diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py
index a7166bc3..ea6b1a2c 100644
--- a/python/fatcat/crossref_importer.py
+++ b/python/fatcat/crossref_importer.py
@@ -106,6 +106,7 @@ class FatcatCrossrefImporter(FatcatImporter):
ce.editgroup_id = editgroup_id
container = self.api.create_container(ce)
re.container_id = container.ident
+ self._issnl_id_map[ce.issnl] = container.ident
created = self.api.create_work(we)
re.work_id = created.ident
self.api.create_release(re)
diff --git a/python/fatcat/importer_common.py b/python/fatcat/importer_common.py
index c24565b4..5bdb61b4 100644
--- a/python/fatcat/importer_common.py
+++ b/python/fatcat/importer_common.py
@@ -84,4 +84,4 @@ class FatcatImporter:
def issn2issnl(self, issn):
if issn is None:
return None
- self._issn_issnl_map.get(issn)
+ return self._issn_issnl_map.get(issn)
diff --git a/python/tests/files/ISSN-to-ISSN-L.snip.txt b/python/tests/files/ISSN-to-ISSN-L.snip.txt
index 965a49d6..c97de279 100644
--- a/python/tests/files/ISSN-to-ISSN-L.snip.txt
+++ b/python/tests/files/ISSN-to-ISSN-L.snip.txt
@@ -1,10 +1,10 @@
ISSN ISSN-L
-0000-0019 0000-0019
-0000-0027 0000-0027
-0000-0043 0000-0043
-0000-0051 0000-0051
-0000-006X 0000-006X
-0000-0078 0000-0078
-0000-0094 0000-0094
-0000-0108 0000-0108
-0000-0140 0000-0140
+0000-0019 0002-0019
+0000-0027 0002-0027
+0000-0043 0002-0043
+0000-0051 0002-0051
+0000-006X 0002-006X
+0000-0078 0002-0078
+0000-0094 0002-0094
+0000-0108 0002-0108
+0000-0140 0002-0140
diff --git a/python/tests/files/crossref-works.2018-01-21.badsample.json b/python/tests/files/crossref-works.2018-01-21.badsample.json
index 84271489..d0ce191f 100644
--- a/python/tests/files/crossref-works.2018-01-21.badsample.json
+++ b/python/tests/files/crossref-works.2018-01-21.badsample.json
@@ -1,4 +1,4 @@
-{ "_id" : { "$oid" : "5a55183088a035a45bd906de" }, "indexed" : { "date-parts" : [ [ 2017, 10, 23 ] ], "date-time" : "2017-10-23T14:35:29Z", "timestamp" : { "$numberLong" : "1508769329541" } }, "reference-count" : 7, "publisher" : "Elsevier BV", "issue" : "3", "license" : [ { "URL" : "http://www.elsevier.com/tdm/userlicense/1.0/", "start" : { "date-parts" : [ [ 2002, 3, 1 ] ], "date-time" : "2002-03-01T00:00:00Z", "timestamp" : { "$numberLong" : "1014940800000" } }, "delay-in-days" : 0, "content-version" : "tdm" } ], "content-domain" : { "domain" : [], "crossmark-restriction" : false }, "short-container-title" : [ "Journal of the American Academy of Dermatology" ], "published-print" : { "date-parts" : [ [ 2002, 3 ] ] }, "DOI" : "10.1067/mjd.2002.110660", "type" : "journal-article", "created" : { "date-parts" : [ [ 2002, 8, 24 ] ], "date-time" : "2002-08-24T22:14:26Z", "timestamp" : { "$numberLong" : "1030227266000" } }, "page" : "434-436", "source" : "Crossref", "is-referenced-by-count" : 7, "title" : [ "Progressive generalized alopecia due to systemic amyloidosis" ], "prefix" : "10.1067", "volume" : "46", "author" : [ { "given" : "Michael E.", "family" : "Lutz", "affiliation" : [] }, { "given" : "Mark R.", "family" : "Pittelkow", "affiliation" : [] } ], "member" : "78", "container-title" : [ "Journal of the American Academy of Dermatology" ], "link" : [ { "URL" : "http://api.elsevier.com/content/article/PII:S0190962202365551?httpAccept=text/xml", "content-type" : "text/xml", "content-version" : "vor", "intended-application" : "text-mining" }, { "URL" : "http://api.elsevier.com/content/article/PII:S0190962202365551?httpAccept=text/plain", "content-type" : "text/plain", "content-version" : "vor", "intended-application" : "text-mining" } ], "deposited" : { "date-parts" : [ [ 2017, 6, 14 ] ], "date-time" : "2017-06-14T16:37:31Z", "timestamp" : { "$numberLong" : "1497458251000" } }, "score" : 1, "issued" : { "date-parts" : [ [ 2002, 3 ] ] }, "references-count" : 7, "alternative-id" : [ "S0190962202365551" ], "URL" : "http://dx.doi.org/10.1067/mjd.2002.110660", "ISSN" : [ "0190-9622" ], "issn-type" : [ { "value" : "0190-9622", "type" : "print" } ], "subject" : [ "Dermatology" ] }
+{ "_id" : { "$oid" : "5a55183088a035a45bd906de" }, "indexed" : { "date-parts" : [ [ 2017, 10, 23 ] ], "date-time" : "2017-10-23T14:35:29Z", "timestamp" : { "$numberLong" : "1508769329541" } }, "reference-count" : 7, "publisher" : "Elsevier BV", "issue" : "3", "license" : [ { "URL" : "http://www.elsevier.com/tdm/userlicense/1.0/", "start" : { "date-parts" : [ [ 2002, 3, 1 ] ], "date-time" : "2002-03-01T00:00:00Z", "timestamp" : { "$numberLong" : "1014940800000" } }, "delay-in-days" : 0, "content-version" : "tdm" } ], "content-domain" : { "domain" : [], "crossmark-restriction" : false }, "short-container-title" : [ "Journal of the American Academy of Dermatology" ], "published-print" : { "date-parts" : [ [ 2002, 3 ] ] }, "DOI" : "10.1067/mjd.2002.110660", "type" : "journal-article", "created" : { "date-parts" : [ [ 2002, 8, 24 ] ], "date-time" : "2002-08-24T22:14:26Z", "timestamp" : { "$numberLong" : "1030227266000" } }, "page" : "434-436", "source" : "Crossref", "is-referenced-by-count" : 7, "title" : [ "Progressive generalized alopecia due to systemic amyloidosis" ], "prefix" : "10.1067", "volume" : "46", "author" : [ { "given" : "Michael E.", "family" : "Lutz", "affiliation" : [] }, { "given" : "Mark R.", "family" : "Pittelkow", "affiliation" : [] } ], "member" : "78", "container-title" : [ "Journal of the American Academy of Dermatology" ], "link" : [ { "URL" : "http://api.elsevier.com/content/article/PII:S0190962202365551?httpAccept=text/xml", "content-type" : "text/xml", "content-version" : "vor", "intended-application" : "text-mining" }, { "URL" : "http://api.elsevier.com/content/article/PII:S0190962202365551?httpAccept=text/plain", "content-type" : "text/plain", "content-version" : "vor", "intended-application" : "text-mining" } ], "deposited" : { "date-parts" : [ [ 2017, 6, 14 ] ], "date-time" : "2017-06-14T16:37:31Z", "timestamp" : { "$numberLong" : "1497458251000" } }, "score" : 1, "issued" : { "date-parts" : [ [ 2002, 3 ] ] }, "references-count" : 7, "alternative-id" : [ "S0190962202365551" ], "URL" : "http://dx.doi.org/10.1067/mjd.2002.110660", "ISSN" : [ "0000-0140" ], "issn-type" : [ { "value" : "0190-9622", "type" : "print" } ], "subject" : [ "Dermatology" ] }
{ "_id" : { "$oid" : "5a5513fb88a035a45bd63d2e" }, "indexed" : { "date-parts" : [ [ 2017, 10, 23 ] ], "date-time" : "2017-10-23T14:15:17Z", "timestamp" : { "$numberLong" : "1508768117199" } }, "reference-count" : 25, "publisher" : "Wiley-Blackwell", "issue" : "4", "license" : [ { "URL" : "http://doi.wiley.com/10.1002/tdm_license_1.1", "start" : { "date-parts" : [ [ 2015, 9, 1 ] ], "date-time" : "2015-09-01T00:00:00Z", "timestamp" : { "$numberLong" : "1441065600000" } }, "delay-in-days" : 6452, "content-version" : "tdm" } ], "content-domain" : { "domain" : [], "crossmark-restriction" : false }, "short-container-title" : [ "Int. J. Quant. Chem." ], "published-print" : { "date-parts" : [ [ 1998 ] ] }, "DOI" : "10.1002/(sici)1097-461x(1998)66:4<261::aid-qua1>3.0.co;2-t", "type" : "journal-article", "created" : { "date-parts" : [ [ 2002, 8, 25 ] ], "date-time" : "2002-08-25T21:09:51Z", "timestamp" : { "$numberLong" : "1030309791000" } }, "page" : "261-272", "source" : "Crossref", "is-referenced-by-count" : 5, "title" : [ "Renormalized perturbation theory by the moment method for degenerate states: Anharmonic oscillators" ], "prefix" : "10.1002", "volume" : "66", "author" : [ { "given" : "Marcelo D.", "family" : "Radicioni", "affiliation" : [] }, { "given" : "Carlos G.", "family" : "Diaz", "affiliation" : [] }, { "given" : "Francisco M.", "family" : "Fern�ndez", "affiliation" : [] } ], "member" : "311", "reference" : [ { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB1", "author" : "Swenson", "volume" : "57", "first-page" : "1734", "year" : "1972", "journal-title" : "J. Chem. Phys.", "DOI" : "10.1063/1.1678462", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB2", "author" : "Killingbeck", "volume" : "65", "first-page" : "87", "year" : "1978", "journal-title" : "Phys. Lett. A", "DOI" : "10.1016/0375-9601(78)90580-7", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB3", "author" : "Fernández", "volume" : "43", "year" : "1987", "unstructured" : "and Hypervirial Theorems, Lecture Notes in Chemistry, Vol. 43, (Springer, Berlin, 1987).", "volume-title" : "Hypervirial Theorems, Lecture Notes in Chemistry", "DOI" : "10.1007/978-3-642-93349-3", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB4", "author" : "Arteca", "volume" : "53", "year" : "1990", "unstructured" : "and Large Order Perturbation Theory and Summation Methods in Quantum Mechanics, Lecture Notes in Chemistry, Vol. 53, (Springer, Berlin, 1990).", "volume-title" : "Large Order Perturbation Theory and Summation Methods in Quantum Mechanics, Lecture Notes in Chemistry", "DOI" : "10.1007/978-3-642-93469-8", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB5", "author" : "Ader", "volume" : "97", "first-page" : "178", "year" : "1983", "journal-title" : "Phys. Lett. A", "DOI" : "10.1016/0375-9601(83)90352-3", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB6", "author" : "Blankenbecler", "volume" : "21", "first-page" : "1055", "year" : "1980", "journal-title" : "Phys. Rev. D", "DOI" : "10.1103/PhysRevD.21.1055", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB7", "author" : "Fernández", "volume" : "26", "first-page" : "497", "year" : "1984", "journal-title" : "Int. J. Quantum Chem.", "DOI" : "10.1002/qua.560260408", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB8", "author" : "Arteca", "volume" : "128", "first-page" : "253", "year" : "1984", "journal-title" : "Physica A", "DOI" : "10.1016/0378-4371(84)90090-6", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB9", "author" : "Fernández", "volume" : "28", "first-page" : "603", "year" : "1985", "journal-title" : "Int. J. Quantum Chem.", "DOI" : "10.1002/qua.560280507", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB10", "author" : "Fernández", "volume" : "20", "first-page" : "3777", "year" : "1987", "journal-title" : "J. Phys. A", "DOI" : "10.1088/0305-4470/20/12/027", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB11", "author" : "Austin", "volume" : "18", "first-page" : "449", "year" : "1984", "journal-title" : "Int. J. Quantum Chem. S", "DOI" : "10.1002/qua.560260841", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB12", "author" : "Killingbeck", "volume" : "18", "first-page" : "793", "year" : "1985", "journal-title" : "J. Phys. A", "DOI" : "10.1088/0305-4470/18/5/012", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB13", "author" : "Killingbeck", "volume" : "19", "first-page" : "705", "year" : "1986", "journal-title" : "J. Phys. A", "DOI" : "10.1088/0305-4470/19/5/023", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB14", "author" : "Witwit", "volume" : "24", "first-page" : "3053", "year" : "1991", "journal-title" : "J. Phys. A", "DOI" : "10.1088/0305-4470/24/13/020", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB15", "author" : "Witwit", "volume" : "24", "first-page" : "4535", "year" : "1991", "journal-title" : "J. Phys. A", "DOI" : "10.1088/0305-4470/24/19/017", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB16", "author" : "Witwit", "volume" : "33", "first-page" : "4196", "year" : "1992", "journal-title" : "J. Math. Phys.", "DOI" : "10.1063/1.529818", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB17", "author" : "Witwit", "volume" : "36", "first-page" : "187", "year" : "1995", "journal-title" : "J. Math. Phys.", "DOI" : "10.1063/1.531299", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB18", "author" : "Killingbeck", "volume" : "14", "first-page" : "1005", "year" : "1981", "journal-title" : "J. Phys. A", "DOI" : "10.1088/0305-4470/14/5/020", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB19", "author" : "Killingbeck", "volume" : "14", "first-page" : "l461", "year" : "1981", "journal-title" : "J. Phys. B", "DOI" : "10.1088/0022-3700/14/14/001", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB20", "author" : "Fernández", "volume" : "25", "first-page" : "492", "year" : "1992", "journal-title" : "J. Phys. A" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB21", "author" : "Fernández", "volume" : "165", "first-page" : "314", "year" : "1992", "journal-title" : "Phys. Lett. A", "DOI" : "10.1016/0375-9601(92)90500-L", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB22", "author" : "Fernández", "volume" : "178", "first-page" : "11", "year" : "1993", "journal-title" : "Phys. Lett. A", "DOI" : "10.1016/0375-9601(93)90719-G", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB23", "author" : "Simon", "volume" : "58", "first-page" : "76", "year" : "1970", "journal-title" : "Ann. Phys. (N.Y.)", "DOI" : "10.1016/0003-4916(70)90240-X", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB24", "author" : "Press", "year" : "1986", "unstructured" : "and Numerical Recipes, (Cambridge University Press, Cambridge, 1986).", "volume-title" : "Numerical Recipes" }, { "key" : "10.1002/(SICI)1097-461X(1998)66:4<261::AID-QUA1>3.0.CO;2-T-BIB25", "author" : "Spirko", "volume" : "102", "first-page" : "8916", "year" : "1995", "journal-title" : "J. Chem. Phys.", "DOI" : "10.1063/1.468945", "doi-asserted-by" : "crossref" } ], "container-title" : [ "International Journal of Quantum Chemistry" ], "link" : [ { "URL" : "https://api.wiley.com/onlinelibrary/tdm/v1/articles/10.1002%2F(SICI)1097-461X(1998)66:4%3C261::AID-QUA1%3E3.0.CO;2-T", "content-type" : "unspecified", "content-version" : "vor", "intended-application" : "text-mining" } ], "deposited" : { "date-parts" : [ [ 2017, 7, 23 ] ], "date-time" : "2017-07-23T04:32:16Z", "timestamp" : { "$numberLong" : "1500784336000" } }, "score" : 1, "issued" : { "date-parts" : [ [ 1998 ] ] }, "references-count" : 25, "URL" : "http://dx.doi.org/10.1002/(sici)1097-461x(1998)66:4<261::aid-qua1>3.0.co;2-t", "relation" : { "cites" : [] }, "ISSN" : [ "0020-7608", "1097-461X" ], "issn-type" : [ { "value" : "0020-7608", "type" : "print" }, { "value" : "1097-461X", "type" : "electronic" } ], "subject" : [ "Physical and Theoretical Chemistry", "Atomic and Molecular Physics, and Optics", "Condensed Matter Physics" ] }
{ "_id" : { "$oid" : "5a5515c788a035a45bd77a1b" }, "indexed" : { "date-parts" : [ [ 2017, 10, 23 ] ], "date-time" : "2017-10-23T14:24:07Z", "timestamp" : { "$numberLong" : "1508768647545" } }, "reference-count" : 10, "publisher" : "Wiley-Blackwell", "issue" : "3", "license" : [ { "URL" : "http://doi.wiley.com/10.1002/tdm_license_1.1", "start" : { "date-parts" : [ [ 2015, 9, 1 ] ], "date-time" : "2015-09-01T00:00:00Z", "timestamp" : { "$numberLong" : "1441065600000" } }, "delay-in-days" : 4991, "content-version" : "tdm" } ], "content-domain" : { "domain" : [], "crossmark-restriction" : false }, "short-container-title" : [ "Cell Biochem. Funct." ], "published-print" : { "date-parts" : [ [ 2002, 9 ] ] }, "DOI" : "10.1002/cbf.935", "type" : "journal-article", "created" : { "date-parts" : [ [ 2002, 9, 11 ] ], "date-time" : "2002-09-11T02:05:28Z", "timestamp" : { "$numberLong" : "1031709928000" } }, "page" : "191-194", "source" : "Crossref", "is-referenced-by-count" : 6, "title" : [ "Cytokine detection in HIV-1/HHV-8 co-infected subjects" ], "prefix" : "10.1002", "volume" : "20", "author" : [ { "given" : "Agostino", "family" : "Pugliese", "affiliation" : [] }, { "given" : "Donato", "family" : "Torre", "affiliation" : [] }, { "given" : "Andrea", "family" : "Saini", "affiliation" : [] }, { "given" : "Gloria", "family" : "Pagliano", "affiliation" : [] }, { "given" : "Gloria", "family" : "Gallo", "affiliation" : [] }, { "given" : "Pietro Giorgio", "family" : "Pistono", "affiliation" : [] }, { "given" : "Gian Carlo", "family" : "Paggi", "affiliation" : [] } ], "member" : "311", "published-online" : { "date-parts" : [ [ 2002 ] ] }, "reference" : [ { "key" : "10.1002/cbf.935-BIB1", "author" : "Chang", "volume" : "266", "first-page" : "1865", "year" : "1994", "journal-title" : "Science", "DOI" : "10.1126/science.7997879", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/cbf.935-BIB2", "author" : "Drago", "volume" : "135", "first-page" : "71", "year" : "1999", "journal-title" : "Arch. Dermatol" }, { "key" : "10.1002/cbf.935-BIB3", "author" : "Pugliese", "volume" : "24", "first-page" : "258", "year" : "2000", "journal-title" : "Cancer Detect Prevent" }, { "key" : "10.1002/cbf.935-BIB4", "author" : "Clerici", "volume" : "15", "first-page" : "575", "year" : "1994", "journal-title" : "Immunol Today", "DOI" : "10.1016/0167-5699(94)90220-8", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/cbf.935-BIB5", "author" : "Zhang", "volume" : "185", "first-page" : "837", "year" : "1997", "journal-title" : "J Exp Med" }, { "key" : "10.1002/cbf.935-BIB6", "author" : "Vincenzi", "volume" : "62", "first-page" : "34", "year" : "1997", "journal-title" : "J Leuk Biol" }, { "key" : "10.1002/cbf.935-BIB7", "author" : "Stoll", "volume" : "28", "first-page" : "3231", "year" : "1998", "journal-title" : "Eur J Immunol", "DOI" : "10.1002/(SICI)1521-4141(199810)28:10<3231::AID-IMMU3231>3.0.CO;2-Q", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/cbf.935-BIB8", "author" : "Fiorelli", "volume" : "91", "first-page" : "956", "year" : "1998", "journal-title" : "Blood" }, { "key" : "10.1002/cbf.935-BIB9", "author" : "Boshoff", "volume" : "75", "first-page" : "57", "year" : "1998", "journal-title" : "Adv Cancer Res.", "DOI" : "10.1016/S0065-230X(08)60739-3", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/cbf.935-BIB10", "author" : "Fakoya", "volume" : "11", "first-page" : "1445", "year" : "1997", "journal-title" : "AIDS", "DOI" : "10.1097/00002030-199712000-00008", "doi-asserted-by" : "crossref" } ], "container-title" : [ "Cell Biochemistry and Function" ], "link" : [ { "URL" : "https://api.wiley.com/onlinelibrary/tdm/v1/articles/10.1002%2Fcbf.935", "content-type" : "unspecified", "content-version" : "vor", "intended-application" : "text-mining" } ], "deposited" : { "date-parts" : [ [ 2017, 7, 27 ] ], "date-time" : "2017-07-27T01:56:41Z", "timestamp" : { "$numberLong" : "1501120601000" } }, "score" : 1, "issued" : { "date-parts" : [ [ 2002 ] ] }, "references-count" : 10, "URL" : "http://dx.doi.org/10.1002/cbf.935", "relation" : { "cites" : [] }, "ISSN" : [ "0263-6484", "1099-0844" ], "issn-type" : [ { "value" : "0263-6484", "type" : "print" }, { "value" : "1099-0844", "type" : "electronic" } ], "subject" : [ "Clinical Biochemistry", "Cell Biology", "Biochemistry", "General Medicine" ] }
{ "_id" : { "$oid" : "5a5515c788a035a45bd77a35" }, "indexed" : { "date-parts" : [ [ 2017, 10, 23 ] ], "date-time" : "2017-10-23T14:24:07Z", "timestamp" : { "$numberLong" : "1508768647674" } }, "reference-count" : 31, "publisher" : "Wiley-Blackwell", "issue" : "4", "license" : [ { "URL" : "http://doi.wiley.com/10.1002/tdm_license_1.1", "start" : { "date-parts" : [ [ 2015, 9, 1 ] ], "date-time" : "2015-09-01T00:00:00Z", "timestamp" : { "$numberLong" : "1441065600000" } }, "delay-in-days" : 4946, "content-version" : "tdm" } ], "content-domain" : { "domain" : [], "crossmark-restriction" : false }, "short-container-title" : [ "Angew. Chem. Int. Ed." ], "published-print" : { "date-parts" : [ [ 2002, 2, 15 ] ] }, "DOI" : "10.1002/1521-3773(20020215)41:4<583::aid-anie583>3.0.co;2-i", "type" : "journal-article", "created" : { "date-parts" : [ [ 2002, 8, 25 ] ], "date-time" : "2002-08-25T23:46:56Z", "timestamp" : { "$numberLong" : "1030319216000" } }, "page" : "583-585", "source" : "Crossref", "is-referenced-by-count" : 126, "title" : [ "Noninterpenetrating Square-Grid Coordination Polymers With Dimensions of 25×25 Å2 Prepared by UsingN,N′-Type Ligands: The First Chiral Square-Grid Coordination Polymer" ], "prefix" : "10.1002", "volume" : "41", "author" : [ { "given" : "Neil G.", "family" : "Pschirer", "affiliation" : [] }, { "given" : "Delia M.", "family" : "Ciurtin", "affiliation" : [] }, { "given" : "Mark D.", "family" : "Smith", "affiliation" : [] }, { "given" : "Uwe H. F.", "family" : "Bunz", "affiliation" : [] }, { "given" : "Hans-Conrad", "family" : "zur Loye", "affiliation" : [] } ], "member" : "311", "reference" : [ { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB1", "journal-title" : "Design of Solids From Molecular Building Blocks: Golden Opportunities for Solid State Chemistry" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB2.1", "author" : "Dong", "volume" : "112", "first-page" : "4441", "year" : "2000", "journal-title" : "Angew. Chem.", "DOI" : "10.1002/1521-3757(20001201)112:23<4441::AID-ANGE4441>3.0.CO;2-B", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB2.2", "volume" : "39", "first-page" : "4271", "year" : "2000", "journal-title" : "Angew. Chem. Int. Ed.", "DOI" : "10.1002/1521-3773(20001201)39:23<4271::AID-ANIE4271>3.0.CO;2-1", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB3", "author" : "Kang", "volume" : "120", "first-page" : "3650", "year" : "1998", "journal-title" : "J. Am. Chem. Soc.", "DOI" : "10.1021/ja973898+", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB4", "author" : "Kang", "volume" : "120", "first-page" : "7389", "year" : "1998", "journal-title" : "J. Am. Chem. Soc.", "DOI" : "10.1021/ja980927n", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB5.1", "author" : "Yünlü", "volume" : "97", "first-page" : "863", "year" : "1985", "journal-title" : "Angew. Chem.", "DOI" : "10.1002/ange.19850971016", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB5.2", "volume" : "24", "first-page" : "879", "year" : "1985", "journal-title" : "Angew. Chem. Int. Ed. Engl.", "DOI" : "10.1002/anie.198508791", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB6", "author" : "Chen", "volume" : "291", "first-page" : "1021", "year" : "2001", "journal-title" : "Science", "DOI" : "10.1126/science.1056598", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB7", "author" : "Dong", "volume" : "11", "first-page" : "1413", "year" : "1999", "journal-title" : "Chem. Mater.", "DOI" : "10.1021/cm990082u", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB8", "author" : "Dong", "volume" : "2", "first-page" : "861", "year" : "2000", "journal-title" : "Solid State Sci.", "DOI" : "10.1016/S1293-2558(00)01094-3", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB9A", "author" : "Biradha", "first-page" : "15", "year" : "2001", "journal-title" : "Chem. Commun.", "DOI" : "10.1039/b007014i", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB9B", "unstructured" : "P. J. Stang, B. Olenyuk, Acc. Chem. Res., 1977, 30, 502;", "DOI" : "10.1021/ar9602011", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB9C", "unstructured" : "P. J. Stang, D. H. Cao, S. Saito, A. M. Arif, J. Am. Chem. Soc. 1995, 117, 6273.", "DOI" : "10.1021/ja00128a015", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB10", "author" : "Dong", "volume" : "12", "first-page" : "1156", "year" : "2000", "journal-title" : "Chem. Mater.", "DOI" : "10.1021/cm9907965", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB11", "author" : "Zaworotko", "first-page" : "1", "year" : "2001", "journal-title" : "Chem. Commun.", "DOI" : "10.1039/b007127g", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB12.1", "author" : "Biradha", "volume" : "112", "first-page" : "4001", "year" : "2000", "journal-title" : "Angew. Chem.", "DOI" : "10.1002/1521-3757(20001103)112:21<4001::AID-ANGE4001>3.0.CO;2-5", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB12.2", "volume" : "39", "first-page" : "3843", "year" : "2000", "journal-title" : "Angew. Chem. Int. Ed.", "DOI" : "10.1002/1521-3773(20001103)39:21<3843::AID-ANIE3843>3.0.CO;2-#", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB13.1", "author" : "Batten", "volume" : "110", "first-page" : "1558", "year" : "1998", "journal-title" : "Angew. Chem.", "DOI" : "10.1002/(SICI)1521-3757(19980605)110:11<1558::AID-ANGE1558>3.0.CO;2-7", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB13.2", "volume" : "37", "first-page" : "1460", "year" : "1998", "journal-title" : "Angew. Chem. Int. Ed.", "DOI" : "10.1002/(SICI)1521-3773(19980619)37:11<1460::AID-ANIE1460>3.0.CO;2-Z", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB14", "unstructured" : "U. Bunz, H.-C. zur Loye, unpublished results, 2001." }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB17", "unstructured" : "A. M. C. T. PLATON, Utrecht University, Utrecht, The Netherlands, Spek, A.L. 1998." }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB18", "author" : "Ezuhara", "volume" : "121", "first-page" : "3279", "year" : "1999", "journal-title" : "J. Am. Chem. Soc.", "DOI" : "10.1021/ja9819918", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB19.1", "author" : "Biradha", "volume" : "111", "first-page" : "584", "year" : "1999", "journal-title" : "Angew. Chem.", "DOI" : "10.1002/(SICI)1521-3757(19990215)111:4<584::AID-ANGE584>3.0.CO;2-Z", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB19.2", "volume" : "38", "first-page" : "492", "year" : "1999", "journal-title" : "Angew. Chem. Int. Ed.", "DOI" : "10.1002/(SICI)1521-3773(19990215)38:4<492::AID-ANIE492>3.0.CO;2-#", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB20", "author" : "Chen", "first-page" : "4010", "year" : "2000", "journal-title" : "J. Chem. Soc. Dalton Trans.", "DOI" : "10.1039/b007004l", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB21", "author" : "Fragoso", "first-page" : "1547", "year" : "2000", "journal-title" : "Chem. Commun.", "DOI" : "10.1039/b002360o", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB22", "author" : "Carlucci", "first-page" : "1319", "year" : "2000", "journal-title" : "Chem. Commun.", "DOI" : "10.1039/b002021o", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB23", "author" : "Blake", "first-page" : "665", "year" : "2000", "journal-title" : "Chem. Commun.", "DOI" : "10.1039/a909868b", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB24", "author" : "Carlucci", "first-page" : "1837", "year" : "1998", "journal-title" : "Chem. Commun.", "DOI" : "10.1039/a803662d", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB25.1", "author" : "Mamula", "volume" : "111", "first-page" : "3129", "year" : "1999", "journal-title" : "Angew. Chem.", "DOI" : "10.1002/(SICI)1521-3757(19991004)111:19<3129::AID-ANGE3129>3.0.CO;2-X", "doi-asserted-by" : "crossref" }, { "key" : "10.1002/1521-3773(20020215)41:4<583::AID-ANIE583>3.0.CO;2-I-BIB25.2", "volume" : "38", "first-page" : "2945", "year" : "1999", "journal-title" : "Angew. Chem. Int. Ed.", "DOI" : "10.1002/(SICI)1521-3773(19991004)38:19<2945::AID-ANIE2945>3.0.CO;2-D", "doi-asserted-by" : "crossref" } ], "container-title" : [ "Angewandte Chemie International Edition" ], "link" : [ { "URL" : "https://api.wiley.com/onlinelibrary/tdm/v1/articles/10.1002%2F1521-3773(20020215)41:4%3C583::AID-ANIE583%3E3.0.CO;2-I", "content-type" : "unspecified", "content-version" : "vor", "intended-application" : "text-mining" } ], "deposited" : { "date-parts" : [ [ 2017, 7, 27 ] ], "date-time" : "2017-07-27T01:55:53Z", "timestamp" : { "$numberLong" : "1501120553000" } }, "score" : 1, "issued" : { "date-parts" : [ [ 2002, 2, 15 ] ] }, "references-count" : 31, "URL" : "http://dx.doi.org/10.1002/1521-3773(20020215)41:4<583::aid-anie583>3.0.co;2-i", "relation" : { "cites" : [] }, "ISSN" : [ "1433-7851", "1521-3773" ], "issn-type" : [ { "value" : "1433-7851", "type" : "print" }, { "value" : "1521-3773", "type" : "electronic" } ], "subject" : [ "General Chemistry", "Catalysis" ] }
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
diff --git a/python/tests/routes.py b/python/tests/routes.py
index d6815740..d0af67c9 100644
--- a/python/tests/routes.py
+++ b/python/tests/routes.py
@@ -27,6 +27,9 @@ def test_all_views(app):
rv = app.get('/container/00000000-0000-0000-1111-000000000002'.format(route))
assert rv.status_code == 200
+ rv = app.get('/container/create')
+ assert rv.status_code == 200
+
rv = app.get('/creator/00000000-0000-0000-2222-000000000002'.format(route))
assert rv.status_code == 200