From 96e38edde79735b4080ec08d57e9f54759e97b61 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 2 Jan 2020 17:35:54 +0100 Subject: datacite: add conversion fixtures The `test_datacite_conversions` function will compare an input (datacite) document to an expected output (release entity as JSON). This way, it should not be too hard to add more cases by adding: input, output - and by increasing the counter in the range loop within the test. To view input and result side by side with vim, change into the test directory and run: tests/files/datacite $ ./caseview.sh 18 --- python/tests/files/datacite/datacite_doc_12.json | 103 +++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 python/tests/files/datacite/datacite_doc_12.json (limited to 'python/tests/files/datacite/datacite_doc_12.json') diff --git a/python/tests/files/datacite/datacite_doc_12.json b/python/tests/files/datacite/datacite_doc_12.json new file mode 100644 index 00000000..31c0f0ca --- /dev/null +++ b/python/tests/files/datacite/datacite_doc_12.json @@ -0,0 +1,103 @@ +{ + "id": "10.5167/uzh-171449", + "type": "dois", + "attributes": { + "doi": "10.5167/uzh-171449", + "identifiers": [ + { + "identifier": "https://doi.org/10.5167/uzh-171449", + "identifierType": "DOI" + } + ], + "creators": [ + { + "name": "Spanias, Charalampos", + "nameType": "Personal", + "givenName": "Charalampos", + "familyName": "Spanias", + "affiliation": [], + "nameIdentifiers": [] + }, + { + "name": "Nikolaidis, Pantelis T", + "nameType": "Personal", + "givenName": "Pantelis T", + "familyName": "Nikolaidis", + "affiliation": [], + "nameIdentifiers": [] + }, + { + "name": "Rosemann, Thomas", + "nameType": "Personal", + "givenName": "Thomas", + "familyName": "Rosemann", + "affiliation": [], + "nameIdentifiers": [] + }, + { + "name": "Knechtle, Beat", + "nameType": "Personal", + "givenName": "Beat", + "familyName": "Knechtle", + "affiliation": [], + "nameIdentifiers": [] + } + ], + "titles": [ + { + "title": "Anthropometric and Physiological Profile of Mixed Martial Art Athletes: A Brief Review" + } + ], + "publisher": "MDPI Publishing", + "container": {}, + "publicationYear": 2019, + "subjects": [], + "contributors": [], + "dates": [ + { + "date": "2019-06-14", + "dateType": "Available" + }, + { + "date": "2019", + "dateType": "Issued" + } + ], + "language": null, + "types": { + "ris": "RPRT", + "bibtex": "article", + "citeproc": "article-journal", + "schemaOrg": "ScholarlyArticle", + "resourceTypeGeneral": "Text" + }, + "relatedIdentifiers": [], + "sizes": [], + "formats": [], + "version": null, + "rightsList": [], + "descriptions": [], + "geoLocations": [], + "fundingReferences": [], + "url": "https://www.zora.uzh.ch/id/eprint/171449", + "contentUrl": null, + "metadataVersion": 0, + "schemaVersion": null, + "source": "mds", + "isActive": true, + "state": "findable", + "reason": null, + "created": "2019-06-27T01:01:35.000Z", + "registered": "2019-06-27T01:01:36.000Z", + "published": "2019", + "updated": "2019-09-26T16:44:24.000Z" + }, + "relationships": { + "client": { + "data": { + "id": "ethz.zora", + "type": "clients" + } + } + } +} -- cgit v1.2.3