diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20200727_from_error.xml b/src/pds_doi_service/core/outputs/test/data/DOI_Release_20200727_from_error.xml deleted file mode 100644 index 16e11de6..00000000 --- a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20200727_from_error.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - 29348 - NASA-PDS - InSight Cameras Bundle 0 - National Aeronautics and Space Administration (NASA) - urn:nasa:pds:insight_cameras::2.0 - 10.17189/29348 - NASA Planetary Data System - NASA Planetary Data System - 2019-01-01 - US - InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products - https://pds.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0 - Dataset - PDS4 Refereed Data Bundle - 2021-02-24 - 2021-03-16 - Camera;Context;Deployment;Insight;Instrument;Lander;Mars;Mission;PDS;Planet;Raw;Science;Spacecraft - Registration update failed: {"errors":[{"source":"url","uid":"10.17189/29348","title":"URL https://pds.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0 is not allowed by repository osti.nasapds domain settings."}]} - - - H. - Abarca - - - - J. - Maki - - - - R. - Deen - - - - P. - Zamani - - - - - - Planetary Data System: Engineering Node - DataCurator - - - - R. F. - Beebe - Editor - - - - M. - Lemmon - Editor - - - - P. H. - Smith - Editor - - - - - - diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20200727_from_release.xml b/src/pds_doi_service/core/outputs/test/data/DOI_Release_20200727_from_release.xml deleted file mode 100644 index 6a4731b7..00000000 --- a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20200727_from_release.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - 29569 - InSight Cameras Bundle - 10.17189/29569 - National Aeronautics and Space Administration (NASA) - urn:nasa:pds:insight_cameras::1.0 - NASA Planetary Data System - NASA Planetary Data System - 2019-01-01 - US - InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products - https://pds.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0 - Dataset - PDS4 Refereed Data Bundle - 2021-04-01 - PDS;PDS4;camera;context;data;deployment;edr;engineering;experiment;insight;lander;mars;product;raw;rdr;record;reduced;science - - - Deen - R. - - - Abarca - H. - - - Zamani - P. - - - Maki - J. - - - - - - Smith - P. H. - Editor - - - - - Lemmon - M. - Editor - - - - - Beebe - R. F. - Editor - - - - Planetary Data System: Engineering Node - DataCurator - - - PDS Operator - PDS - pds-operator@jpl.nasa.gov - 818.393.7165 - - diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210615_from_release.json b/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210615_from_release.json deleted file mode 100644 index eaf37772..00000000 --- a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210615_from_release.json +++ /dev/null @@ -1,340 +0,0 @@ -{ - "data": [ - { - "id": "10.13143/yzw2-vz66", - "type": "dois", - "attributes": { - "doi": "10.13143/yzw2-vz66", - "identifiers": [ - { - "identifier": "10.13143/yzw2-vz66", - "identifierType": "DOI" - } - ], - "creators": [ - { - "name": "Deen, R.", - "nameType": "Personal", - "givenName": "R.", - "familyName": "Deen", - "affiliation": [], - "nameIdentifiers": [] - }, - { - "name": "Abarca, H.", - "nameType": "Personal", - "givenName": "H.", - "familyName": "Abarca", - "affiliation": [], - "nameIdentifiers": [] - }, - { - "name": "Zamani, P.", - "nameType": "Personal", - "givenName": "P.", - "familyName": "Zamani", - "affiliation": [], - "nameIdentifiers": [] - }, - { - "name": "Maki, J.", - "nameType": "Personal", - "givenName": "J.", - "familyName": "Maki", - "affiliation": [], - "nameIdentifiers": [] - } - ], - "titles": [ - { - "title": "InSight Cameras Bundle" - } - ], - "publisher": "NASA Planetary Data System", - "container": {}, - "publicationYear": "2019", - "subjects": [ - { - "subject": "PDS" - }, - { - "subject": "PDS4" - }, - { - "subject": "camera" - }, - { - "subject": "context" - }, - { - "subject": "data" - }, - { - "subject": "deployment" - }, - { - "subject": "edr" - }, - { - "subject": "engineering" - }, - { - "subject": "experiment" - }, - { - "subject": "insight" - }, - { - "subject": "lander" - }, - { - "subject": "mars" - }, - { - "subject": "product" - }, - { - "subject": "raw" - }, - { - "subject": "rdr" - }, - { - "subject": "record" - }, - { - "subject": "reduced" - }, - { - "subject": "science" - } - ], - "contributors": [ - { - "name": "Smith, P. H.", - "nameType": "Personal", - "givenName": "P. H.", - "familyName": "Smith", - "contributorType": "Editor", - "affiliation": [], - "nameIdentifiers": [] - }, - { - "name": "Lemmon, M.", - "nameType": "Personal", - "givenName": "M.", - "familyName": "Lemmon", - "contributorType": "Editor", - "affiliation": [], - "nameIdentifiers": [] - }, - { - "name": "Beebe, R. F.", - "nameType": "Personal", - "givenName": "R. F.", - "familyName": "Beebe", - "contributorType": "Editor", - "affiliation": [], - "nameIdentifiers": [] - }, - { - "name": "Planetary Data System: Engineering Node", - "nameType": "Organizational", - "contributorType": "DataCurator", - "affiliation": [], - "nameIdentifiers": [] - } - ], - "dates": [], - "language": "en", - "types": { - "ris": "DATA", - "bibtex": "misc", - "citeproc": "dataset", - "schemaOrg": "Dataset", - "resourceType": "PDS4 Refereed Data Bundle", - "resourceTypeGeneral": "Dataset" - }, - "relatedIdentifiers": [ - { - "relationType": "HasMetadata", - "relatedIdentifier": "urn:nasa:pds:insight_cameras::1.0", - "resourceTypeGeneral": "Text", - "relatedIdentifierType": "URN" - } - ], - "sizes": [], - "formats": [], - "rightsList": [], - "descriptions": [ - { - "lang": "english", - "description": "InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products", - "descriptionType": "Abstract" - } - ], - "geoLocations": [], - "fundingReferences": [], - "url": "https://pds.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0", - "contentUrl": null, - "metadataVersion": 0, - "schemaVersion": "http://datacite.org/schema/kernel-4", - "source": "api", - "isActive": true, - "state": "findable", - "reason": null, - "viewCount": 0, - "downloadCount": 0, - "referenceCount": 0, - "citationCount": 0, - "partCount": 0, - "partOfCount": 0, - "versionCount": 0, - "versionOfCount": 0, - "created": "2021-06-22T22:55:19Z", - "registered": "2021-06-22T22:55:53Z", - "published": null, - "updated": "2021-06-22T23:00:09Z" - }, - "relationships": { - "client": { - "data": { - "id": "dev.fhpuqw", - "type": "clients" - } - } - } - } - ], - "meta": { - "total": 1, - "totalPages": 1, - "page": 1, - "states": [ - { - "id": "findable", - "title": "Findable", - "count": 1 - } - ], - "resourceTypes": [ - { - "id": "dataset", - "title": "Dataset", - "count": 1 - } - ], - "created": [ - { - "id": "2021", - "title": "2021", - "count": 1 - } - ], - "published": [ - { - "id": "2019", - "title": "2019", - "count": 1 - } - ], - "registered": [ - { - "id": "2021", - "title": "2021", - "count": 1 - } - ], - "providers": [ - { - "id": "dev", - "title": "Developer Provider", - "count": 1 - } - ], - "clients": [ - { - "id": "dev.fhpuqw", - "title": "JPL NASA", - "count": 1 - } - ], - "affiliations": [], - "prefixes": [ - { - "id": "10.13143", - "title": "10.13143", - "count": 1 - } - ], - "certificates": [], - "licenses": [], - "schemaVersions": [ - { - "id": "4", - "title": "Schema 4", - "count": 1 - } - ], - "linkChecksStatus": [], - "subjects": [ - { - "id": "PDS", - "title": "Pds", - "count": 1 - }, - { - "id": "PDS4", - "title": "Pds4", - "count": 1 - }, - { - "id": "camera", - "title": "Camera", - "count": 1 - }, - { - "id": "context", - "title": "Context", - "count": 1 - }, - { - "id": "data", - "title": "Data", - "count": 1 - }, - { - "id": "deployment", - "title": "Deployment", - "count": 1 - }, - { - "id": "edr", - "title": "Edr", - "count": 1 - }, - { - "id": "engineering", - "title": "Engineering", - "count": 1 - }, - { - "id": "experiment", - "title": "Experiment", - "count": 1 - }, - { - "id": "insight", - "title": "Insight", - "count": 1 - } - ], - "fieldsOfScience": [], - "citations": [], - "views": [], - "downloads": [] - }, - "links": { - "self": "https://api.test.datacite.org/dois?query=10.13143%2Fd0e6-qs05&client-id=dev.fhpuqw" - } -} diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210615_from_reserve.json b/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210615_from_reserve.json deleted file mode 100644 index f166633d..00000000 --- a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210615_from_reserve.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "data": { - "id": "10.13143/yzw2-vz66", - "type": "dois", - "attributes": { - "doi": "10.13143/yzw2-vz66", - "prefix": "10.13143", - "suffix": "yzw2-vz66", - "identifiers": [ - { - "identifier": "10.13143/yzw2-vz66", - "identifierType": "DOI" - }, - { - "identifier": "urn:nasa:pds:insight_cameras::1.0", - "identifierType": "URN" - } - ], - "alternateIdentifiers": [], - "creators": [ - { - "nameType": "Personal", - "name": "Deen, R.", - "givenName": "R.", - "familyName": "Deen", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - }, - { - "nameType": "Personal", - "name": "Abarca, H.", - "givenName": "H.", - "familyName": "Abarca", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - }, - { - "nameType": "Personal", - "name": "Zamani, P.", - "givenName": "P.", - "familyName": "Zamani", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - }, - { - "nameType": "Personal", - "name": "Maki, J.", - "givenName": "J.", - "familyName": "Maki", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - } - ], - "titles": [ - { - "title": "InSight Cameras Bundle" - } - ], - "publisher": "NASA Planetary Data System", - "container": {}, - "publicationYear": "2019", - "subjects": [ - { - "subject": "PDS" - }, - { - "subject": "PDS4" - }, - { - "subject": "camera" - }, - { - "subject": "context" - }, - { - "subject": "data" - }, - { - "subject": "deployment" - }, - { - "subject": "edr" - }, - { - "subject": "engineering" - }, - { - "subject": "experiment" - }, - { - "subject": "insight" - }, - { - "subject": "lander" - }, - { - "subject": "mars" - }, - { - "subject": "product" - }, - { - "subject": "raw" - }, - { - "subject": "rdr" - }, - { - "subject": "record" - }, - { - "subject": "reduced" - }, - { - "subject": "science" - } - ], - "contributors": [ - { - "nameType": "Personal", - "name": "Smith, P. H.", - "givenName": "P. H.", - "familyName": "Smith", - "contributorType": "Editor", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - }, - { - "nameType": "Personal", - "name": "Lemmon, M.", - "givenName": "M.", - "familyName": "Lemmon", - "contributorType": "Editor", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - }, - { - "nameType": "Personal", - "name": "Beebe, R. F.", - "givenName": "R. F.", - "familyName": "Beebe", - "contributorType": "Editor", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - }, - { - "nameType": "Organizational", - "name": "Planetary Data System: Engineering Node", - "contributorType": "DataCurator", - "affiliation": ["NASA PDS"], - "nameIdentifiers": [] - } - ], - "dates": [], - "language": "en", - "types": { - "schemaOrg": "Dataset", - "citeproc": "dataset", - "bibtex": "misc", - "ris": "DATA", - "resourceTypeGeneral": "Dataset", - "resourceType": "PDS4 Refereed Data Bundle" - }, - "relatedIdentifiers": [ - { - "relatedIdentifier": "urn:nasa:pds:insight_cameras::1.0", - "relatedIdentifierType": "URN", - "relationType": "HasMetadata" - } - ], - "sizes": [], - "formats": [], - "rightsList": [], - "descriptions": [ - { - "description": "InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products", - "descriptionType": "Abstract", - "lang": "english" - } - ], - "geoLocations": [], - "fundingReferences": [], - "xml": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHJlc291cmNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCBodHRwOi8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ogIDxyZWxhdGVkSWRlbnRpZmllcnM+CiAgICA8cmVsYXRlZElkZW50aWZpZXIgcmVsYXRlZElkZW50aWZpZXJUeXBlPSJVUk4iIHJlbGF0aW9uVHlwZT0iSGFzTWV0YWRhdGEiIHJlc291cmNlVHlwZUdlbmVyYWw9IlRleHQiPnVybjpuYXNhOnBkczppbnNpZ2h0X2NhbWVyYXM6OjEuMDwvcmVsYXRlZElkZW50aWZpZXI+CiAgPC9yZWxhdGVkSWRlbnRpZmllcnM+CiAgPHNpemVzLz4KICA8Zm9ybWF0cy8+CiAgPHZlcnNpb24vPgogIDxkZXNjcmlwdGlvbnM+CiAgICA8ZGVzY3JpcHRpb24geG1sOmxhbmc9ImVuZ2xpc2giIGRlc2NyaXB0aW9uVHlwZT0iQWJzdHJhY3QiPkluU2lnaHQgQ2FtZXJhcyBFeHBlcmltZW50IERhdGEgUmVjb3JkIChFRFIpIGFuZCBSZWR1Y2VkIERhdGEgUmVjb3JkIChSRFIpIERhdGEgUHJvZHVjdHM8L2Rlc2NyaXB0aW9uPgogIDwvZGVzY3JpcHRpb25zPgo8L3Jlc291cmNlPgo=", - "url": "https://pds.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0", - "contentUrl": null, - "metadataVersion": 0, - "schemaVersion": "http://datacite.org/schema/kernel-4", - "source": "api", - "isActive": false, - "state": "draft", - "reason": null, - "landingPage": null, - "viewCount": 0, - "viewsOverTime": [], - "downloadCount": 0, - "downloadsOverTime": [], - "referenceCount": 0, - "citationCount": 0, - "citationsOverTime": [], - "partCount": 0, - "partOfCount": 0, - "versionCount": 0, - "versionOfCount": 0, - "created": "2021-06-03T18:39:13.000Z", - "registered": null, - "published": "2019", - "updated": "2021-06-03T18:39:13.000Z" - } - } -} diff --git a/src/pds_doi_service/core/outputs/test/data/datacite_record_draft.json b/src/pds_doi_service/core/outputs/test/data/datacite_record_draft.json new file mode 120000 index 00000000..28cec153 --- /dev/null +++ b/src/pds_doi_service/core/outputs/test/data/datacite_record_draft.json @@ -0,0 +1 @@ +../../../input/test/data/datacite_record_draft.json \ No newline at end of file diff --git a/src/pds_doi_service/core/outputs/test/data/datacite_record_findable.json b/src/pds_doi_service/core/outputs/test/data/datacite_record_findable.json new file mode 120000 index 00000000..eb24b27f --- /dev/null +++ b/src/pds_doi_service/core/outputs/test/data/datacite_record_findable.json @@ -0,0 +1 @@ +../../../actions/test/data/datacite_record_findable.json \ No newline at end of file diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Reserved_multi_entry.json b/src/pds_doi_service/core/outputs/test/data/datacite_record_multi_entry.json similarity index 100% rename from src/pds_doi_service/core/outputs/test/data/DOI_Reserved_multi_entry.json rename to src/pds_doi_service/core/outputs/test/data/datacite_record_multi_entry.json diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210216_from_error.json b/src/pds_doi_service/core/outputs/test/data/osti_record_error.json similarity index 100% rename from src/pds_doi_service/core/outputs/test/data/DOI_Release_20210216_from_error.json rename to src/pds_doi_service/core/outputs/test/data/osti_record_error.json diff --git a/src/pds_doi_service/core/outputs/test/data/osti_record_error.xml b/src/pds_doi_service/core/outputs/test/data/osti_record_error.xml new file mode 120000 index 00000000..a56156f4 --- /dev/null +++ b/src/pds_doi_service/core/outputs/test/data/osti_record_error.xml @@ -0,0 +1 @@ +../../../actions/test/data/osti_record_error.xml \ No newline at end of file diff --git a/src/pds_doi_service/core/outputs/test/data/DOI_Release_20210216_from_release.json b/src/pds_doi_service/core/outputs/test/data/osti_record_pending.json similarity index 100% rename from src/pds_doi_service/core/outputs/test/data/DOI_Release_20210216_from_release.json rename to src/pds_doi_service/core/outputs/test/data/osti_record_pending.json diff --git a/src/pds_doi_service/core/outputs/test/data/osti_record_pending.xml b/src/pds_doi_service/core/outputs/test/data/osti_record_pending.xml new file mode 120000 index 00000000..8fc8fbc3 --- /dev/null +++ b/src/pds_doi_service/core/outputs/test/data/osti_record_pending.xml @@ -0,0 +1 @@ +../../../actions/test/data/osti_record_pending.xml \ No newline at end of file diff --git a/src/pds_doi_service/core/outputs/test/datacite_test.py b/src/pds_doi_service/core/outputs/test/datacite_test.py index 9f1ba9ec..bab8395e 100644 --- a/src/pds_doi_service/core/outputs/test/datacite_test.py +++ b/src/pds_doi_service/core/outputs/test/datacite_test.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import json -import os import unittest from datetime import datetime from os.path import abspath @@ -37,7 +36,7 @@ def setUpClass(cls): def test_create_datacite_label_json(self): """Test creation of a DataCite JSON label from a Doi object""" # Parse sample input to obtain a Doi object - input_json_file = join(self.input_dir, "DOI_Release_20210615_from_reserve.json") + input_json_file = join(self.input_dir, "datacite_record_draft.json") with open(input_json_file, "r") as infile: input_json = infile.read() @@ -79,7 +78,7 @@ def test_create_datacite_label_json(self): def test_update_datacite_label_json(self): """Test creation of a DataCite label for a DOI record where the identifier has been updated""" - input_json_file = join(self.input_dir, "DOI_Release_20210615_from_reserve.json") + input_json_file = join(self.input_dir, "datacite_record_draft.json") with open(input_json_file, "r") as infile: input_json = infile.read() @@ -116,7 +115,7 @@ def requests_valid_request_patch(method, url, **kwargs): response = Response() response.status_code = 200 - with open(join(DOIDataCiteWebClientTestCase.input_dir, "DOI_Release_20210615_from_release.json")) as infile: + with open(join(DOIDataCiteWebClientTestCase.input_dir, "datacite_record_findable.json")) as infile: response._content = infile.read().encode() return response @@ -335,7 +334,7 @@ def _compare_doi_to_expected(self, doi): def test_parse_datacite_response_json(self): """Test parsing of an DataCite label in JSON format""" # Test with a nominal file containing most of the optional fields - input_json_file = join(self.input_dir, "DOI_Release_20210615_from_reserve.json") + input_json_file = join(self.input_dir, "datacite_record_draft.json") with open(input_json_file, "r") as infile: input_json = infile.read() @@ -350,7 +349,7 @@ def test_parse_datacite_response_json(self): def test_get_record_for_identifier(self): """Test isolation of specific record based on PDS identifier""" - input_json_file = join(self.input_dir, "DOI_Reserved_multi_entry.json") + input_json_file = join(self.input_dir, "datacite_record_multi_entry.json") # Test extraction of a single record from a multi-entry label, parse the # DOI from the result, and ensure we get the record back we expected @@ -376,7 +375,7 @@ def test_get_record_for_identifier(self): def test_get_record_for_doi(self): """Test isolation of a specific record based on DOI""" - input_json_file = join(self.input_dir, "DOI_Reserved_multi_entry.json") + input_json_file = join(self.input_dir, "datacite_record_multi_entry.json") # Test extraction of a single record from a multi-entry label, parse the DOI # from the result, and ensure we got the record back we expected @@ -411,7 +410,7 @@ def test_json_label_validation(self): validator = DOIDataCiteValidator() # Parse sample input to obtain a Doi object - input_json_file = join(self.input_dir, "DOI_Release_20210615_from_reserve.json") + input_json_file = join(self.input_dir, "datacite_record_draft.json") # Next, create a valid output DataCite label from the parsed Doi with open(input_json_file, "r") as infile: diff --git a/src/pds_doi_service/core/outputs/test/osti_test.py b/src/pds_doi_service/core/outputs/test/osti_test.py index cfb03f2f..ec2e082a 100644 --- a/src/pds_doi_service/core/outputs/test/osti_test.py +++ b/src/pds_doi_service/core/outputs/test/osti_test.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import json -import os import unittest from datetime import datetime from os.path import abspath @@ -27,7 +26,7 @@ def setUpClass(cls): def test_create_osti_label_xml(self): """Test creation of an OSTI XML label from a Doi object""" # Parse sample input to obtain a Doi object - input_xml_file = join(self.input_dir, "DOI_Release_20200727_from_release.xml") + input_xml_file = join(self.input_dir, "osti_record_pending.xml") with open(input_xml_file, "r") as infile: input_xml = infile.read() @@ -52,7 +51,7 @@ def test_create_osti_label_xml(self): def test_create_osti_label_json(self): """Test creation of an OSTI JSON label from Doi objects""" # Parse sample input to obtain a Doi object - input_json_file = join(self.input_dir, "DOI_Release_20210216_from_release.json") + input_json_file = join(self.input_dir, "osti_record_pending.json") with open(input_json_file, "r") as infile: input_json = infile.read() @@ -147,7 +146,7 @@ def _compare_doi_to_expected(self, doi): def test_parse_osti_response_xml(self): """Test parsing of an OSTI label in XML format""" # Test with a nominal file containing most of the optional fields - input_xml_file = join(self.input_dir, "DOI_Release_20200727_from_release.xml") + input_xml_file = join(self.input_dir, "osti_record_pending.xml") with open(input_xml_file, "r") as infile: input_xml = infile.read() @@ -161,7 +160,7 @@ def test_parse_osti_response_xml(self): self._compare_doi_to_expected(doi) # Test with an erroneous file to ensure errors are parsed as we expect - input_xml_file = join(self.input_dir, "DOI_Release_20200727_from_error.xml") + input_xml_file = join(self.input_dir, "osti_record_error.xml") with open(input_xml_file, "r") as infile: input_xml = infile.read() @@ -173,7 +172,7 @@ def test_parse_osti_response_xml(self): def test_parse_osti_response_json(self): """Test parsing of an OSTI label in JSON format""" # Test with a nominal file containing most of the optional fields - input_json_file = join(self.input_dir, "DOI_Release_20210216_from_release.json") + input_json_file = join(self.input_dir, "osti_record_pending.json") with open(input_json_file, "r") as infile: input_json = infile.read() @@ -187,7 +186,7 @@ def test_parse_osti_response_json(self): self._compare_doi_to_expected(doi) # Test with an erroneous file to ensure errors are parsed as we expect - input_json_file = join(self.input_dir, "DOI_Release_20210216_from_error.json") + input_json_file = join(self.input_dir, "osti_record_error.json") with open(input_json_file, "r") as infile: input_json = infile.read()