diff options
author | Alexandru Fikl <alexfikl@gmail.com> | 2024-05-09 12:25:24 +0200 |
---|---|---|
committer | Alex Fikl <alexfikl@gmail.com> | 2024-05-09 15:08:14 +0300 |
commit | 166afe5a9bd5289a6b0a5e2e2a92d6721bf744b7 (patch) | |
tree | 48427ce3c9a808095ee09f49c19fe45c042bf3d9 | |
parent | e0b9123eb45921e6b1e28bc5aa73ebbb240b84f3 (diff) |
tests: add multiple isbn test
-rw-r--r-- | tests/resources/crossref/test_4_multiple_isbn.json | 191 | ||||
-rw-r--r-- | tests/resources/crossref/test_4_multiple_isbn_out.json | 76 | ||||
-rw-r--r-- | tests/test_crossref.py | 3 |
3 files changed, 269 insertions, 1 deletions
diff --git a/tests/resources/crossref/test_4_multiple_isbn.json b/tests/resources/crossref/test_4_multiple_isbn.json new file mode 100644 index 00000000..b369958c --- /dev/null +++ b/tests/resources/crossref/test_4_multiple_isbn.json @@ -0,0 +1,191 @@ +{ + "status": "ok", + "message-type": "work", + "message-version": "1.0.0", + "message": { + "indexed": { + "date-parts": [ + [ + 2024, + 4, + 30 + ] + ], + "date-time": "2024-04-30T11:17:07Z", + "timestamp": 1714475827478 + }, + "publisher-location": "Basel", + "reference-count": 7, + "publisher": "Birkhäuser Basel", + "isbn-type": [ + { + "value": "9783034897426", + "type": "print" + }, + { + "value": "9783034887205", + "type": "electronic" + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [], + "published-print": { + "date-parts": [ + [ + 1999 + ] + ] + }, + "DOI": "10.1007/978-3-0348-8720-5_13", + "type": "book-chapter", + "created": { + "date-parts": [ + [ + 2011, + 8, + 10 + ] + ], + "date-time": "2011-08-10T19:54:35Z", + "timestamp": 1313006075000 + }, + "page": "113-118", + "source": "Crossref", + "is-referenced-by-count": 15, + "title": [ + "Differentiability with Respect to Initial Data for a Scalar Conservation Law" + ], + "prefix": "10.1007", + "author": [ + { + "given": "François", + "family": "Bouchut", + "sequence": "first", + "affiliation": [] + }, + { + "given": "François", + "family": "James", + "sequence": "additional", + "affiliation": [] + } + ], + "member": "297", + "reference": [ + { + "key": "13_CR1", + "first-page": "1097", + "volume": "320", + "author": "F Bouchut", + "year": "1995", + "unstructured": "F. Bouchut and F. James, Équations de transport unidimensionnelles é coefficients discontinus, C.R. Acad. Sci. Paris, Série I, 320 (1995), 1097–1102.", + "journal-title": "C.R. Acad. Sci. Paris, Série I" + }, + { + "key": "13_CR2", + "first-page": "891", + "volume": "32", + "author": "F Bouchut", + "year": "1998", + "unstructured": "F. Bouchut and F. James, One-dimensional transport equations with discontinuous coefficients, Prépublication MAPMO n° 96–13, université d’Orléans, avril 1996, Nonlinear Analysis, TMA, 32 (1998), No 7, 891–933", + "journal-title": "Prépublication MAPMO n° 96–13, université d’Orléans, avril 1996" + }, + { + "key": "13_CR3", + "first-page": "549", + "volume-title": "Équations aux dérivées partielles et applications, articles dédiés é J.-L. Lions", + "author": "E Godlewski", + "year": "1998", + "unstructured": "E. Godlewski, M. Olazabal and P.-A. Raviart, On the linearization of hyperbolic systems of conservation laws. Application to stability, Équations aux dérivées partielles et applications, articles dédiés é J.-L. Lions, Gauthier-Villars, Paris, 1998, 549–570" + }, + { + "key": "13_CR4", + "doi-asserted-by": "publisher", + "first-page": "217", + "DOI": "10.1070/SM1970v010n02ABEH002156", + "volume": "10", + "author": "SN Kružkov", + "year": "1970", + "unstructured": "S.N. Kružkov, First-order quasilinear equations in several independent variables, Math. USSR Sb., 10 (1970), 217–243.", + "journal-title": "Math. USSR Sb" + }, + { + "key": "13_CR5", + "doi-asserted-by": "crossref", + "unstructured": "A. Majda, The stability of multi-dimensional shock fronts, Mem. Amer. Math. Soc, 275 (1982).", + "DOI": "10.1090/memo/0275" + }, + { + "key": "13_CR6", + "unstructured": "M. Olazabal Résolution numérique du système des perturbations linéaires d’unécoulement MHD, Thèse Université Paris 6, 1998." + }, + { + "issue": "2", + "key": "13_CR7", + "first-page": "95", + "volume": "26", + "author": "OA Oleinik", + "year": "1963", + "unstructured": "O.A. Oleinik, Discontinuous solutions of nonlinear differential equations, Amer. Math. Soc. Transi. (2), 26 (1963), 95–172.", + "journal-title": "Amer. Math. Soc. Transi" + } + ], + "container-title": [ + "Hyperbolic Problems: Theory, Numerics, Applications" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "http://link.springer.com/content/pdf/10.1007/978-3-0348-8720-5_13.pdf", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 12, + 10 + ] + ], + "date-time": "2020-12-10T16:13:45Z", + "timestamp": 1607616825000 + }, + "score": 1, + "resource": { + "primary": { + "URL": "http://link.springer.com/10.1007/978-3-0348-8720-5_13" + } + }, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 1999 + ] + ] + }, + "ISBN": [ + "9783034897426", + "9783034887205" + ], + "references-count": 7, + "URL": "http://dx.doi.org/10.1007/978-3-0348-8720-5_13", + "relation": {}, + "subject": [], + "published": { + "date-parts": [ + [ + 1999 + ] + ] + } + } +} diff --git a/tests/resources/crossref/test_4_multiple_isbn_out.json b/tests/resources/crossref/test_4_multiple_isbn_out.json new file mode 100644 index 00000000..33331c09 --- /dev/null +++ b/tests/resources/crossref/test_4_multiple_isbn_out.json @@ -0,0 +1,76 @@ +{ + "author": "Bouchut, François and James, François", + "author_list": [ + { + "affiliation": [], + "family": "Bouchut", + "given": "François" + }, + { + "affiliation": [], + "family": "James", + "given": "François" + } + ], + "citations": [ + { + "author": "F Bouchut", + "first-page": "1097", + "journal-title": "C.R. Acad. Sci. Paris, Série I", + "unstructured": "F. Bouchut and F. James, Équations de transport unidimensionnelles é coefficients discontinus, C.R. Acad. Sci. Paris, Série I, 320 (1995), 1097–1102.", + "volume": "320", + "year": "1995" + }, + { + "author": "F Bouchut", + "first-page": "891", + "journal-title": "Prépublication MAPMO n° 96–13, université d’Orléans, avril 1996", + "unstructured": "F. Bouchut and F. James, One-dimensional transport equations with discontinuous coefficients, Prépublication MAPMO n° 96–13, université d’Orléans, avril 1996, Nonlinear Analysis, TMA, 32 (1998), No 7, 891–933", + "volume": "32", + "year": "1998" + }, + { + "author": "E Godlewski", + "first-page": "549", + "unstructured": "E. Godlewski, M. Olazabal and P.-A. Raviart, On the linearization of hyperbolic systems of conservation laws. Application to stability, Équations aux dérivées partielles et applications, articles dédiés é J.-L. Lions, Gauthier-Villars, Paris, 1998, 549–570", + "volume-title": "Équations aux dérivées partielles et applications, articles dédiés é J.-L. Lions", + "year": "1998" + }, + { + "author": "SN Kružkov", + "doi": "10.1070/SM1970v010n02ABEH002156", + "first-page": "217", + "journal-title": "Math. USSR Sb", + "unstructured": "S.N. Kružkov, First-order quasilinear equations in several independent variables, Math. USSR Sb., 10 (1970), 217–243.", + "volume": "10", + "year": "1970" + }, + { + "doi": "10.1090/memo/0275", + "unstructured": "A. Majda, The stability of multi-dimensional shock fronts, Mem. Amer. Math. Soc, 275 (1982)." + }, + { + "unstructured": "M. Olazabal Résolution numérique du système des perturbations linéaires d’unécoulement MHD, Thèse Université Paris 6, 1998." + }, + { + "author": "OA Oleinik", + "first-page": "95", + "issue": "2", + "journal-title": "Amer. Math. Soc. Transi", + "unstructured": "O.A. Oleinik, Discontinuous solutions of nonlinear differential equations, Amer. Math. Soc. Transi. (2), 26 (1963), 95–172.", + "volume": "26", + "year": "1963" + } + ], + "doc_url": "http://link.springer.com/content/pdf/10.1007/978-3-0348-8720-5_13.pdf", + "doi": "10.1007/978-3-0348-8720-5_13", + "isbn": "9783034887205", + "journal": "Hyperbolic Problems: Theory, Numerics, Applications", + "language": "en", + "pages": "113--118", + "publisher": "Birkhäuser Basel", + "title": "Differentiability with Respect to Initial Data for a Scalar Conservation Law", + "type": "inbook", + "url": "http://dx.doi.org/10.1007/978-3-0348-8720-5_13", + "year": 1999 +}
\ No newline at end of file diff --git a/tests/test_crossref.py b/tests/test_crossref.py index 4616e94b..4cba2a0f 100644 --- a/tests/test_crossref.py +++ b/tests/test_crossref.py @@ -34,7 +34,8 @@ def test_get_data(tmp_config: TemporaryConfiguration) -> None: @pytest.mark.parametrize(("doi", "basename"), [ ("10.1103/physrevb.89.140501", "test_1_multiple_authors"), ("10.1103/physrevb.89.140501", "test_2_abstract"), - ("10.1145/3184558.3186235", "test_3_conference") + ("10.1145/3184558.3186235", "test_3_conference"), + ("10.1007/978-3-0348-8720-5_13", "test_4_multiple_isbn"), ]) def test_doi_to_data(tmp_config: TemporaryConfiguration, monkeypatch, doi: str, basename: str) -> None: |