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_15.json | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 python/tests/files/datacite/datacite_doc_15.json (limited to 'python/tests/files/datacite/datacite_doc_15.json') diff --git a/python/tests/files/datacite/datacite_doc_15.json b/python/tests/files/datacite/datacite_doc_15.json new file mode 100644 index 00000000..5b4ee8ec --- /dev/null +++ b/python/tests/files/datacite/datacite_doc_15.json @@ -0,0 +1,79 @@ +{ + "id": "10.6073/pasta/95296d8416aae24f3d39b4ecb27f0b28", + "type": "dois", + "attributes": { + "doi": "10.6073/pasta/95296d8416aae24f3d39b4ecb27f0b28", + "identifiers": [ + { + "identifier": "https://doi.org/10.6073/pasta/95296d8416aae24f3d39b4ecb27f0b28", + "identifierType": "DOI" + }, + { + "identifier": "https://pasta.lternet.edu/package/eml/knb-lter-vcr/102/16", + "identifierType": "URL" + } + ], + "creators": [ + { + "name": "Richardson, David", + "nameType": "Personal", + "givenName": "David", + "familyName": "Richardson", + "affiliation": [] + } + ], + "titles": [ + { + "title": "Parramore Island of the Virginia Coast Reserve Permanent Plot Resurvey: Tree data 1997" + } + ], + "publisher": "Environmental Data Initiative", + "container": {}, + "publicationYear": 2017, + "subjects": [], + "contributors": [], + "dates": [ + { + "date": "2017", + "dateType": "Issued" + } + ], + "language": null, + "types": { + "ris": "DATA", + "bibtex": "misc", + "citeproc": "dataset", + "schemaOrg": "Dataset", + "resourceType": "dataPackage", + "resourceTypeGeneral": "Dataset" + }, + "relatedIdentifiers": [], + "sizes": [], + "formats": [], + "version": null, + "rightsList": [], + "descriptions": [], + "geoLocations": [], + "fundingReferences": [], + "url": "https://portal.lternet.edu/nis/mapbrowse?packageid=knb-lter-vcr.102.16", + "contentUrl": null, + "metadataVersion": 1, + "schemaVersion": "http://datacite.org/schema/kernel-2.2", + "source": null, + "isActive": true, + "state": "findable", + "reason": null, + "created": "2017-02-01T18:20:04.000Z", + "registered": "2017-02-01T18:20:05.000Z", + "published": "2017", + "updated": "2019-08-02T14:16:49.000Z" + }, + "relationships": { + "client": { + "data": { + "id": "edi.edi", + "type": "clients" + } + } + } +} -- cgit v1.2.3