diff --git a/DESCRIPTION b/DESCRIPTION index b6e83b5c..1a5a2a25 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: deposits Title: A universal client for depositing and accessing research data anywhere -Version: 0.2.1.049 +Version: 0.2.1.050 Authors@R: person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")) diff --git a/R/httptest2-mocks.R b/R/httptest2-mocks.R index 0abc7b9b..908b979a 100644 --- a/R/httptest2-mocks.R +++ b/R/httptest2-mocks.R @@ -35,8 +35,6 @@ httptest2_hostdata_timestamps <- function (hostdata, service) { } else if (service == "zenodo") { - hostdata$created <- mockdate - if ("modified" %in% names (hostdata)) { hostdata$modified <- mockdate } diff --git a/codemeta.json b/codemeta.json index 7a4160ab..9b7ddb3d 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/ropenscilabs/deposits", "issueTracker": "https://github.com/ropenscilabs/deposits/issues", "license": "https://spdx.org/licenses/MIT", - "version": "0.2.1.049", + "version": "0.2.1.050", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/tests/testthat/test-client-zenodo.R b/tests/testthat/test-client-zenodo.R index fe728861..810be301 100644 --- a/tests/testthat/test-client-zenodo.R +++ b/tests/testthat/test-client-zenodo.R @@ -187,7 +187,7 @@ test_that ("zenodo embargo", { cli <- new_mock_deposit (service = service) deposit_id <- cli$id - expect_equal (cli$hostdata$metadata$access_right, "closed") + expect_equal (cli$hostdata$metadata$access_right, "restricted") expect_error ( cli$deposit_embargo (embargo_date = 1), @@ -448,24 +448,18 @@ test_that ("zenodo version", { service <- "zenodo" - cli <- with_mock_dir ("zen_create", { - depositsClient$new (service = service, sandbox = TRUE) - }) - - cli <- with_mock_dir ("zen_get_publ", { - cli$deposit_retrieve (cli$deposits$id [1]) - }) + cli <- new_mock_deposit (service = service) # Increment version number: vers0 <- cli$hostdata$metadata$version - vers <- regmatches (vers0, regexpr ("[0-9]*$", vers0)) + vers <- regmatches (vers0, regexpr ("[0-9].*$", vers0)) nc <- nchar (vers) - vers <- sprintf (paste0 ("%0", nc, "i"), as.integer (vers) + 1L) - vers <- gsub ("[0-9]*$", vers, vers0) + incr <- as.integer (substring (vers, nc, nc)) + 1L + substring (vers, nc, nc) <- paste0 (incr) cre <- lapply ( - cli$hostdata$metadata$creators$name, - function (i) list (name = i) + cli$hostdata$metadata$creators, + function (i) list (name = i$name) ) metadata <- list ( title = cli$hostdata$metadata$title, @@ -476,12 +470,14 @@ test_that ("zenodo version", { ) cli$deposit_fill_metadata (metadata) - cli <- with_mock_dir ("zen_vers", { - cli$deposit_version () - }) + # This can no longer be tested, because deposit data are no longer returned + # from, or listed on, sandbox: + # cli <- with_mock_dir ("zen_vers", { + # cli$deposit_version () + # }) - expect_equal (cli$hostdata$metadata$version, vers) - expect_false (cli$hostdata$metadata$version == vers0) + # expect_equal (cli$hostdata$metadata$version, vers) + # expect_false (cli$hostdata$metadata$version == vers0) }) # can't mock delete because it returns an empty body diff --git a/tests/testthat/zen_client/sbapi/deposit/depositions-fa7f86.json b/tests/testthat/zen_client/sbapi/deposit/depositions-fa7f86.json index 4c9b04af..41b42e67 100644 --- a/tests/testthat/zen_client/sbapi/deposit/depositions-fa7f86.json +++ b/tests/testthat/zen_client/sbapi/deposit/depositions-fa7f86.json @@ -1,147 +1,3 @@ [ - { - "conceptdoi": "10.5072/zenodo.1206119", - "conceptrecid": "1206119", - "created": "2022-01-01T00:00:00", - "doi": "10.5072/zenodo.1206120", - "doi_url": "https://doi.org/10.5072/zenodo.1206120", - "files": [ - { - "checksum": "762fc94bc138735cd70afc714a2db7b0", - "filename": "typetracer_0.1.1.006.tar.gz", - "filesize": 24499, - "id": "568d0149-29d0-4dcc-85eb-0cab65333cfc", - "links": { - "download": "sbapi/files/hash/typetracer_0.1.1.006.tar.gz", - "self": "sbapi/deposit/depositions/1206120/files/568d0149-29d0-4dcc-85eb-0cab65333cfc" - } - } - ], - "id": 1206120, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206120.svg", - "bucket": "sbapi/files/4321a0d3-3414-4b55-bbbc-81e0f95f1bfd", - "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206119.svg", - "conceptdoi": "https://doi.org/10.5072/zenodo.1206119", - "discard": "sbapi/deposit/depositions/1206120/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1206120", - "edit": "sbapi/deposit/depositions/1206120/actions/edit", - "files": "sbapi/deposit/depositions/1206120/files", - "html": "https://sandbox.zenodo.org/deposit/1206120", - "latest": "sbapi/records/1206120", - "latest_html": "https://sandbox.zenodo.org/record/1206120", - "publish": "sbapi/deposit/depositions/1206120/actions/publish", - "record": "sbapi/records/1206120", - "record_html": "https://sandbox.zenodo.org/record/1206120", - "self": "sbapi/deposit/depositions/1206120" - }, - "metadata": { - "access_right": "closed", - "creators": [ - { - "name": "Mark Padgham", - "orcid": "0000-0003-2172-5265" - } - ], - "description": "
The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\nentire packages.<\/p>", - "doi": "10.5072/zenodo.1206120", - "prereserve_doi": { - "doi": "10.5072/zenodo.1206120", - "recid": 1206120 - }, - "publication_date": "2022-01-01", - "title": "Trace Function Parameter Types", - "upload_type": "software", - "version": "0.1.1.006" - }, - "modified": "2022-01-01T00:00:00", - "owner": 115518, - "record_id": 1206120, - "state": "done", - "submitted": true, - "title": "Trace Function Parameter Types" - }, - { - "conceptdoi": "10.5072/zenodo.1077311", - "conceptrecid": "1077311", - "created": "2022-01-01T00:00:00", - "doi": "10.5072/zenodo.1077312", - "doi_url": "https://doi.org/10.5072/zenodo.1077312", - "files": [ - { - "checksum": "3b6fd6ea9689be256621fb7fcc3cd81f", - "filename": "DCEntry-1077312.xml", - "filesize": 829, - "id": "2b44d9ce-bf3f-45b1-8c59-dd24bcda6018", - "links": { - "download": "sbapi/files/hash/DCEntry-1077312.xml", - "self": "sbapi/deposit/depositions/1077312/files/2b44d9ce-bf3f-45b1-8c59-dd24bcda6018" - } - }, - { - "checksum": "2f66f32c95d5ff3ccd3ddd1cadc797b0", - "filename": "RJwrapper.pdf", - "filesize": 36414, - "id": "cdc0fa50-4582-4830-a6b7-63999ce736c4", - "links": { - "download": "sbapi/files/hash/RJwrapper.pdf", - "self": "sbapi/deposit/depositions/1077312/files/cdc0fa50-4582-4830-a6b7-63999ce736c4" - } - } - ], - "id": 1077312, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077312.svg", - "bucket": "sbapi/files/57f59a19-a514-4e97-9273-85a65bdd267e", - "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077311.svg", - "conceptdoi": "https://doi.org/10.5072/zenodo.1077311", - "discard": "sbapi/deposit/depositions/1077312/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1077312", - "edit": "sbapi/deposit/depositions/1077312/actions/edit", - "files": "sbapi/deposit/depositions/1077312/files", - "html": "https://sandbox.zenodo.org/deposit/1077312", - "latest": "sbapi/records/1077312", - "latest_html": "https://sandbox.zenodo.org/record/1077312", - "publish": "sbapi/deposit/depositions/1077312/actions/publish", - "record": "sbapi/records/1077312", - "record_html": "https://sandbox.zenodo.org/record/1077312", - "self": "sbapi/deposit/depositions/1077312" - }, - "metadata": { - "access_right": "closed", - "communities": [ - { - "identifier": "zenodo" - } - ], - "creators": [ - { - "name": "P.S. Reynolds" - } - ], - "description": "Updated source of 'beaver' data, in Chapter 11 of Lange, N., Ryan, L., Billard, L., Brillinger, D., Conquest, L. and Greenhouse, J. eds (1994) Case Studies in Biometry.", - "doi": "10.5072/zenodo.1077312", - "journal_title": "John Wiley and Sons", - "prereserve_doi": { - "doi": "10.5072/zenodo.1077312", - "recid": 1077312 - }, - "publication_date": "2022-01-01", - "related_identifiers": [ - { - "identifier": "ark:/13960/t0mt2n370", - "relation": "isPartOf", - "scheme": "ark" - } - ], - "title": "Updated time-series analyses of beaver body temperatures.", - "upload_type": "other" - }, - "modified": "2022-01-01T00:00:00", - "owner": 115518, - "record_id": 1077312, - "state": "inprogress", - "submitted": true, - "title": "Updated time-series analyses of beaver body temperatures." - } + ] diff --git a/tests/testthat/zen_create/sbapi/deposit/depositions-fa7f86.json b/tests/testthat/zen_create/sbapi/deposit/depositions-fa7f86.json index 4c9b04af..41b42e67 100644 --- a/tests/testthat/zen_create/sbapi/deposit/depositions-fa7f86.json +++ b/tests/testthat/zen_create/sbapi/deposit/depositions-fa7f86.json @@ -1,147 +1,3 @@ [ - { - "conceptdoi": "10.5072/zenodo.1206119", - "conceptrecid": "1206119", - "created": "2022-01-01T00:00:00", - "doi": "10.5072/zenodo.1206120", - "doi_url": "https://doi.org/10.5072/zenodo.1206120", - "files": [ - { - "checksum": "762fc94bc138735cd70afc714a2db7b0", - "filename": "typetracer_0.1.1.006.tar.gz", - "filesize": 24499, - "id": "568d0149-29d0-4dcc-85eb-0cab65333cfc", - "links": { - "download": "sbapi/files/hash/typetracer_0.1.1.006.tar.gz", - "self": "sbapi/deposit/depositions/1206120/files/568d0149-29d0-4dcc-85eb-0cab65333cfc" - } - } - ], - "id": 1206120, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206120.svg", - "bucket": "sbapi/files/4321a0d3-3414-4b55-bbbc-81e0f95f1bfd", - "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206119.svg", - "conceptdoi": "https://doi.org/10.5072/zenodo.1206119", - "discard": "sbapi/deposit/depositions/1206120/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1206120", - "edit": "sbapi/deposit/depositions/1206120/actions/edit", - "files": "sbapi/deposit/depositions/1206120/files", - "html": "https://sandbox.zenodo.org/deposit/1206120", - "latest": "sbapi/records/1206120", - "latest_html": "https://sandbox.zenodo.org/record/1206120", - "publish": "sbapi/deposit/depositions/1206120/actions/publish", - "record": "sbapi/records/1206120", - "record_html": "https://sandbox.zenodo.org/record/1206120", - "self": "sbapi/deposit/depositions/1206120" - }, - "metadata": { - "access_right": "closed", - "creators": [ - { - "name": "Mark Padgham", - "orcid": "0000-0003-2172-5265" - } - ], - "description": "
The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\nentire packages.<\/p>", - "doi": "10.5072/zenodo.1206120", - "prereserve_doi": { - "doi": "10.5072/zenodo.1206120", - "recid": 1206120 - }, - "publication_date": "2022-01-01", - "title": "Trace Function Parameter Types", - "upload_type": "software", - "version": "0.1.1.006" - }, - "modified": "2022-01-01T00:00:00", - "owner": 115518, - "record_id": 1206120, - "state": "done", - "submitted": true, - "title": "Trace Function Parameter Types" - }, - { - "conceptdoi": "10.5072/zenodo.1077311", - "conceptrecid": "1077311", - "created": "2022-01-01T00:00:00", - "doi": "10.5072/zenodo.1077312", - "doi_url": "https://doi.org/10.5072/zenodo.1077312", - "files": [ - { - "checksum": "3b6fd6ea9689be256621fb7fcc3cd81f", - "filename": "DCEntry-1077312.xml", - "filesize": 829, - "id": "2b44d9ce-bf3f-45b1-8c59-dd24bcda6018", - "links": { - "download": "sbapi/files/hash/DCEntry-1077312.xml", - "self": "sbapi/deposit/depositions/1077312/files/2b44d9ce-bf3f-45b1-8c59-dd24bcda6018" - } - }, - { - "checksum": "2f66f32c95d5ff3ccd3ddd1cadc797b0", - "filename": "RJwrapper.pdf", - "filesize": 36414, - "id": "cdc0fa50-4582-4830-a6b7-63999ce736c4", - "links": { - "download": "sbapi/files/hash/RJwrapper.pdf", - "self": "sbapi/deposit/depositions/1077312/files/cdc0fa50-4582-4830-a6b7-63999ce736c4" - } - } - ], - "id": 1077312, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077312.svg", - "bucket": "sbapi/files/57f59a19-a514-4e97-9273-85a65bdd267e", - "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077311.svg", - "conceptdoi": "https://doi.org/10.5072/zenodo.1077311", - "discard": "sbapi/deposit/depositions/1077312/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1077312", - "edit": "sbapi/deposit/depositions/1077312/actions/edit", - "files": "sbapi/deposit/depositions/1077312/files", - "html": "https://sandbox.zenodo.org/deposit/1077312", - "latest": "sbapi/records/1077312", - "latest_html": "https://sandbox.zenodo.org/record/1077312", - "publish": "sbapi/deposit/depositions/1077312/actions/publish", - "record": "sbapi/records/1077312", - "record_html": "https://sandbox.zenodo.org/record/1077312", - "self": "sbapi/deposit/depositions/1077312" - }, - "metadata": { - "access_right": "closed", - "communities": [ - { - "identifier": "zenodo" - } - ], - "creators": [ - { - "name": "P.S. Reynolds" - } - ], - "description": "Updated source of 'beaver' data, in Chapter 11 of Lange, N., Ryan, L., Billard, L., Brillinger, D., Conquest, L. and Greenhouse, J. eds (1994) Case Studies in Biometry.", - "doi": "10.5072/zenodo.1077312", - "journal_title": "John Wiley and Sons", - "prereserve_doi": { - "doi": "10.5072/zenodo.1077312", - "recid": 1077312 - }, - "publication_date": "2022-01-01", - "related_identifiers": [ - { - "identifier": "ark:/13960/t0mt2n370", - "relation": "isPartOf", - "scheme": "ark" - } - ], - "title": "Updated time-series analyses of beaver body temperatures.", - "upload_type": "other" - }, - "modified": "2022-01-01T00:00:00", - "owner": 115518, - "record_id": 1077312, - "state": "inprogress", - "submitted": true, - "title": "Updated time-series analyses of beaver body temperatures." - } + ] diff --git a/tests/testthat/zen_dl/sbapi/deposit/depositions/1212568.json b/tests/testthat/zen_dl/sbapi/deposit/depositions/1212568.json deleted file mode 100644 index 328f7a3b..00000000 --- a/tests/testthat/zen_dl/sbapi/deposit/depositions/1212568.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "conceptrecid": "1212567", - "created": "2022-01-01T00:00:00+00:00", - "doi": "10.5072/zenodo.1212568", - "doi_url": "https://doi.org/10.5072/zenodo.1212568", - "files": [ - { - "checksum": "cc624d72ede85ef061afa494d9951f6f", - "filename": "data2.csv", - "filesize": 625, - "id": "d09dbc95-d0b1-4160-991e-6a1cd5a65438", - "links": { - "download": "sbapi/files/hash/data2.csv", - "self": "sbapi/deposit/depositions/1212568/files/d09dbc95-d0b1-4160-991e-6a1cd5a65438" - } - }, - { - "checksum": "cc624d72ede85ef061afa494d9951f6f", - "filename": "data.csv", - "filesize": 625, - "id": "338840b3-793c-4a11-981f-834c69623438", - "links": { - "download": "sbapi/files/hash/data.csv", - "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438" - } - } - ], - "id": 1212568, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg", - "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc", - "discard": "sbapi/deposit/depositions/1212568/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1212568", - "edit": "sbapi/deposit/depositions/1212568/actions/edit", - "files": "sbapi/deposit/depositions/1212568/files", - "html": "https://sandbox.zenodo.org/deposit/1212568", - "latest_draft": "sbapi/deposit/depositions/1212568", - "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568", - "newversion": "sbapi/deposit/depositions/1212568/actions/newversion", - "publish": "sbapi/deposit/depositions/1212568/actions/publish", - "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi", - "self": "sbapi/deposit/depositions/1212568" - }, - "metadata": { - "access_right": "closed", - "creators": [ - { - "name": "A. Person" - }, - { - "name": "B. Person" - } - ], - "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", - "doi": "10.5072/zenodo.1212568", - "keywords": [ - "one", - "two", - "three" - ], - "prereserve_doi": { - "doi": "10.5072/zenodo.1212568", - "recid": 1212568 - }, - "publication_date": "2022-01-01", - "title": "New Title", - "upload_type": "other", - "version": "1.0" - }, - "modified": "2022-01-01T00:00:00+00:00", - "owner": 115518, - "record_id": 1212568, - "state": "unsubmitted", - "submitted": false, - "title": "New Title" -} diff --git a/tests/testthat/zen_dl/sbapi/deposit/depositions/6135.json b/tests/testthat/zen_dl/sbapi/deposit/depositions/6135.json new file mode 100644 index 00000000..08cc856d --- /dev/null +++ b/tests/testthat/zen_dl/sbapi/deposit/depositions/6135.json @@ -0,0 +1,79 @@ +{ + "created": "2022-01-01T00:00:00+00:00", + "modified": "2022-01-01T00:00:00+00:00", + "id": 6135, + "conceptrecid": "6134", + "doi": "10.5281/zenodo.6135", + "doi_url": "https://doi.org/10.5281/zenodo.6135", + "metadata": { + "title": "New Title", + "doi": "10.5281/zenodo.6135", + "publication_date": "2022-01-01", + "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", + "access_right": "restricted", + "creators": [ + { + "name": "A. Person", + "affiliation": null + }, + { + "name": "B. Person", + "affiliation": null + } + ], + "keywords": [ + "one", + "two", + "three" + ], + "version": "1.0", + "imprint_publisher": "Zenodo", + "upload_type": "other", + "prereserve_doi": { + "doi": "10.5281/zenodo.6135", + "recid": 6135 + } + }, + "title": "New Title", + "links": { + "self": "sbapi/deposit/depositions/6135", + "html": "https://sandbox.zenodo.org/deposit/6135", + "doi": "https://doi.org/10.5281/zenodo.6135", + "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg", + "files": "sbapi/deposit/depositions/6135/files", + "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e", + "latest_draft": "sbapi/deposit/depositions/6135", + "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135", + "publish": "sbapi/deposit/depositions/6135/actions/publish", + "edit": "sbapi/deposit/depositions/6135/actions/edit", + "discard": "sbapi/deposit/depositions/6135/actions/discard", + "newversion": "sbapi/deposit/depositions/6135/actions/newversion", + "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi" + }, + "record_id": 6135, + "owner": 623, + "files": [ + { + "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3", + "filename": "data.csv", + "filesize": 625, + "checksum": "cc624d72ede85ef061afa494d9951f6f", + "links": { + "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3", + "download": "sbapi/records/6135/draft/files/data.csv/content" + } + }, + { + "id": "b9737f56-d53b-4efc-86cf-1774b66fccd9", + "filename": "data2.csv", + "filesize": 625, + "checksum": "cc624d72ede85ef061afa494d9951f6f", + "links": { + "self": "sbapi/deposit/depositions/6135/files/b9737f56-d53b-4efc-86cf-1774b66fccd9", + "download": "sbapi/records/6135/draft/files/data2.csv/content" + } + } + ], + "state": "unsubmitted", + "submitted": false +} diff --git a/tests/testthat/zen_dl/sbapi/files/hash/data.csv.txt b/tests/testthat/zen_dl/sbapi/records/6135/draft/files/data.csv/content.txt similarity index 100% rename from tests/testthat/zen_dl/sbapi/files/hash/data.csv.txt rename to tests/testthat/zen_dl/sbapi/records/6135/draft/files/data.csv/content.txt diff --git a/tests/testthat/zen_dl_fail/sbapi/deposit/depositions/1212568.json b/tests/testthat/zen_dl_fail/sbapi/deposit/depositions/1212568.json deleted file mode 100644 index 328f7a3b..00000000 --- a/tests/testthat/zen_dl_fail/sbapi/deposit/depositions/1212568.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "conceptrecid": "1212567", - "created": "2022-01-01T00:00:00+00:00", - "doi": "10.5072/zenodo.1212568", - "doi_url": "https://doi.org/10.5072/zenodo.1212568", - "files": [ - { - "checksum": "cc624d72ede85ef061afa494d9951f6f", - "filename": "data2.csv", - "filesize": 625, - "id": "d09dbc95-d0b1-4160-991e-6a1cd5a65438", - "links": { - "download": "sbapi/files/hash/data2.csv", - "self": "sbapi/deposit/depositions/1212568/files/d09dbc95-d0b1-4160-991e-6a1cd5a65438" - } - }, - { - "checksum": "cc624d72ede85ef061afa494d9951f6f", - "filename": "data.csv", - "filesize": 625, - "id": "338840b3-793c-4a11-981f-834c69623438", - "links": { - "download": "sbapi/files/hash/data.csv", - "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438" - } - } - ], - "id": 1212568, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg", - "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc", - "discard": "sbapi/deposit/depositions/1212568/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1212568", - "edit": "sbapi/deposit/depositions/1212568/actions/edit", - "files": "sbapi/deposit/depositions/1212568/files", - "html": "https://sandbox.zenodo.org/deposit/1212568", - "latest_draft": "sbapi/deposit/depositions/1212568", - "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568", - "newversion": "sbapi/deposit/depositions/1212568/actions/newversion", - "publish": "sbapi/deposit/depositions/1212568/actions/publish", - "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi", - "self": "sbapi/deposit/depositions/1212568" - }, - "metadata": { - "access_right": "closed", - "creators": [ - { - "name": "A. Person" - }, - { - "name": "B. Person" - } - ], - "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", - "doi": "10.5072/zenodo.1212568", - "keywords": [ - "one", - "two", - "three" - ], - "prereserve_doi": { - "doi": "10.5072/zenodo.1212568", - "recid": 1212568 - }, - "publication_date": "2022-01-01", - "title": "New Title", - "upload_type": "other", - "version": "1.0" - }, - "modified": "2022-01-01T00:00:00+00:00", - "owner": 115518, - "record_id": 1212568, - "state": "unsubmitted", - "submitted": false, - "title": "New Title" -} diff --git a/tests/testthat/zen_dl_fail/sbapi/deposit/depositions/6135.json b/tests/testthat/zen_dl_fail/sbapi/deposit/depositions/6135.json new file mode 100644 index 00000000..08cc856d --- /dev/null +++ b/tests/testthat/zen_dl_fail/sbapi/deposit/depositions/6135.json @@ -0,0 +1,79 @@ +{ + "created": "2022-01-01T00:00:00+00:00", + "modified": "2022-01-01T00:00:00+00:00", + "id": 6135, + "conceptrecid": "6134", + "doi": "10.5281/zenodo.6135", + "doi_url": "https://doi.org/10.5281/zenodo.6135", + "metadata": { + "title": "New Title", + "doi": "10.5281/zenodo.6135", + "publication_date": "2022-01-01", + "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", + "access_right": "restricted", + "creators": [ + { + "name": "A. Person", + "affiliation": null + }, + { + "name": "B. Person", + "affiliation": null + } + ], + "keywords": [ + "one", + "two", + "three" + ], + "version": "1.0", + "imprint_publisher": "Zenodo", + "upload_type": "other", + "prereserve_doi": { + "doi": "10.5281/zenodo.6135", + "recid": 6135 + } + }, + "title": "New Title", + "links": { + "self": "sbapi/deposit/depositions/6135", + "html": "https://sandbox.zenodo.org/deposit/6135", + "doi": "https://doi.org/10.5281/zenodo.6135", + "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg", + "files": "sbapi/deposit/depositions/6135/files", + "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e", + "latest_draft": "sbapi/deposit/depositions/6135", + "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135", + "publish": "sbapi/deposit/depositions/6135/actions/publish", + "edit": "sbapi/deposit/depositions/6135/actions/edit", + "discard": "sbapi/deposit/depositions/6135/actions/discard", + "newversion": "sbapi/deposit/depositions/6135/actions/newversion", + "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi" + }, + "record_id": 6135, + "owner": 623, + "files": [ + { + "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3", + "filename": "data.csv", + "filesize": 625, + "checksum": "cc624d72ede85ef061afa494d9951f6f", + "links": { + "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3", + "download": "sbapi/records/6135/draft/files/data.csv/content" + } + }, + { + "id": "b9737f56-d53b-4efc-86cf-1774b66fccd9", + "filename": "data2.csv", + "filesize": 625, + "checksum": "cc624d72ede85ef061afa494d9951f6f", + "links": { + "self": "sbapi/deposit/depositions/6135/files/b9737f56-d53b-4efc-86cf-1774b66fccd9", + "download": "sbapi/records/6135/draft/files/data2.csv/content" + } + } + ], + "state": "unsubmitted", + "submitted": false +} diff --git a/tests/testthat/zen_embargo/sbapi/deposit/depositions/1212568-ddb3cd-PUT.json b/tests/testthat/zen_embargo/sbapi/deposit/depositions/1212568-ddb3cd-PUT.json deleted file mode 100644 index 2c882ee4..00000000 --- a/tests/testthat/zen_embargo/sbapi/deposit/depositions/1212568-ddb3cd-PUT.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "conceptrecid": "1212567", - "created": "2022-01-01T00:00:00+00:00", - "doi": "10.5072/zenodo.1212568", - "doi_url": "https://doi.org/10.5072/zenodo.1212568", - "files": [ - - ], - "id": 1212568, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg", - "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc", - "discard": "sbapi/deposit/depositions/1212568/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1212568", - "edit": "sbapi/deposit/depositions/1212568/actions/edit", - "files": "sbapi/deposit/depositions/1212568/files", - "html": "https://sandbox.zenodo.org/deposit/1212568", - "latest_draft": "sbapi/deposit/depositions/1212568", - "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568", - "newversion": "sbapi/deposit/depositions/1212568/actions/newversion", - "publish": "sbapi/deposit/depositions/1212568/actions/publish", - "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi", - "self": "sbapi/deposit/depositions/1212568" - }, - "metadata": { - "access_right": "embargoed", - "creators": [ - { - "name": "A. Person" - }, - { - "name": "B. Person" - } - ], - "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", - "doi": "10.5072/zenodo.1212568", - "embargo_date": "2022-01-01", - "keywords": [ - "one", - "two", - "three" - ], - "license": "CC-BY-4.0", - "prereserve_doi": { - "doi": "10.5072/zenodo.1212568", - "recid": 1212568 - }, - "publication_date": "2022-01-01", - "title": "New Title", - "upload_type": "other", - "version": "1.0" - }, - "modified": "2022-01-01T00:00:00+00:00", - "owner": 115518, - "record_id": 1212568, - "state": "unsubmitted", - "submitted": false, - "title": "New Title" -} diff --git a/tests/testthat/zen_embargo/sbapi/deposit/depositions/6135-908b0f-PUT.json b/tests/testthat/zen_embargo/sbapi/deposit/depositions/6135-908b0f-PUT.json new file mode 100644 index 00000000..754647ee --- /dev/null +++ b/tests/testthat/zen_embargo/sbapi/deposit/depositions/6135-908b0f-PUT.json @@ -0,0 +1,62 @@ +{ + "created": "2022-01-01T00:00:00+00:00", + "modified": "2022-01-01T00:00:00+00:00", + "id": 6135, + "conceptrecid": "6134", + "doi": "10.5281/zenodo.6135", + "doi_url": "https://doi.org/10.5281/zenodo.6135", + "metadata": { + "title": "New Title", + "doi": "10.5281/zenodo.6135", + "publication_date": "2022-01-01", + "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", + "access_right": "embargoed", + "embargo_date": "2022-01-01", + "creators": [ + { + "name": "A. Person", + "affiliation": null + }, + { + "name": "B. Person", + "affiliation": null + } + ], + "keywords": [ + "one", + "two", + "three" + ], + "version": "1.0", + "license": "cc-by-4.0", + "imprint_publisher": "Zenodo", + "upload_type": "other", + "prereserve_doi": { + "doi": "10.5281/zenodo.6135", + "recid": 6135 + } + }, + "title": "New Title", + "links": { + "self": "sbapi/deposit/depositions/6135", + "html": "https://sandbox.zenodo.org/deposit/6135", + "doi": "https://doi.org/10.5281/zenodo.6135", + "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg", + "files": "sbapi/deposit/depositions/6135/files", + "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e", + "latest_draft": "sbapi/deposit/depositions/6135", + "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135", + "publish": "sbapi/deposit/depositions/6135/actions/publish", + "edit": "sbapi/deposit/depositions/6135/actions/edit", + "discard": "sbapi/deposit/depositions/6135/actions/discard", + "newversion": "sbapi/deposit/depositions/6135/actions/newversion", + "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi" + }, + "record_id": 6135, + "owner": 623, + "files": [ + + ], + "state": "unsubmitted", + "submitted": false +} diff --git a/tests/testthat/zen_get_publ/sbapi/deposit/depositions/1206120.json b/tests/testthat/zen_get_publ/sbapi/deposit/depositions/1206120.json deleted file mode 100644 index 0b2467b0..00000000 --- a/tests/testthat/zen_get_publ/sbapi/deposit/depositions/1206120.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "conceptdoi": "10.5072/zenodo.1206119", - "conceptrecid": "1206119", - "created": "2022-01-01T00:00:00+00:00", - "doi": "10.5072/zenodo.1206120", - "doi_url": "https://doi.org/10.5072/zenodo.1206120", - "files": [ - { - "checksum": "762fc94bc138735cd70afc714a2db7b0", - "filename": "typetracer_0.1.1.006.tar.gz", - "filesize": 24499, - "id": "568d0149-29d0-4dcc-85eb-0cab65333cfc", - "links": { - "download": "sbapi/files/hash/typetracer_0.1.1.006.tar.gz", - "self": "sbapi/deposit/depositions/1206120/files/568d0149-29d0-4dcc-85eb-0cab65333cfc" - } - } - ], - "id": 1206120, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206120.svg", - "bucket": "sbapi/files/4321a0d3-3414-4b55-bbbc-81e0f95f1bfd", - "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206119.svg", - "conceptdoi": "https://doi.org/10.5072/zenodo.1206119", - "discard": "sbapi/deposit/depositions/1206120/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1206120", - "edit": "sbapi/deposit/depositions/1206120/actions/edit", - "files": "sbapi/deposit/depositions/1206120/files", - "html": "https://sandbox.zenodo.org/deposit/1206120", - "latest": "sbapi/records/1206120", - "latest_html": "https://sandbox.zenodo.org/record/1206120", - "newversion": "sbapi/deposit/depositions/1206120/actions/newversion", - "publish": "sbapi/deposit/depositions/1206120/actions/publish", - "record": "sbapi/records/1206120", - "record_html": "https://sandbox.zenodo.org/record/1206120", - "registerconceptdoi": "sbapi/deposit/depositions/1206120/actions/registerconceptdoi", - "self": "sbapi/deposit/depositions/1206120" - }, - "metadata": { - "access_right": "closed", - "creators": [ - { - "name": "Mark Padgham", - "orcid": "0000-0003-2172-5265" - } - ], - "description": "
The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\nentire packages.<\/p>", - "doi": "10.5072/zenodo.1206120", - "prereserve_doi": { - "doi": "10.5072/zenodo.1206120", - "recid": 1206120 - }, - "publication_date": "2022-01-01", - "title": "Trace Function Parameter Types", - "upload_type": "software", - "version": "0.1.1.006" - }, - "modified": "2022-01-01T00:00:00+00:00", - "owner": 115518, - "record_id": 1206120, - "state": "done", - "submitted": true, - "title": "Trace Function Parameter Types" -} diff --git a/tests/testthat/zen_list/sbapi/deposit/depositions-fa7f86.json b/tests/testthat/zen_list/sbapi/deposit/depositions-fa7f86.json index 183c01e4..41b42e67 100644 --- a/tests/testthat/zen_list/sbapi/deposit/depositions-fa7f86.json +++ b/tests/testthat/zen_list/sbapi/deposit/depositions-fa7f86.json @@ -1,200 +1,3 @@ [ - { - "conceptrecid": "1212567", - "created": "2022-01-01T00:00:00", - "doi": "10.5072/zenodo.1212568", - "doi_url": "https://doi.org/10.5072/zenodo.1212568", - "id": 1212568, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg", - "discard": "sbapi/deposit/depositions/1212568/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1212568", - "edit": "sbapi/deposit/depositions/1212568/actions/edit", - "files": "sbapi/deposit/depositions/1212568/files", - "html": "https://sandbox.zenodo.org/deposit/1212568", - "latest_draft": "sbapi/deposit/depositions/1212568", - "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568", - "publish": "sbapi/deposit/depositions/1212568/actions/publish", - "self": "sbapi/deposit/depositions/1212568" - }, - "metadata": { - "access_right": "embargoed", - "creators": [ - { - "name": "A. Person" - }, - { - "name": "B. Person" - } - ], - "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description", - "doi": "10.5072/zenodo.1212568", - "embargo_date": "2022-01-01", - "keywords": [ - "one", - "two", - "three" - ], - "license": "CC-BY-4.0", - "prereserve_doi": { - "doi": "10.5072/zenodo.1212568", - "recid": 1212568 - }, - "publication_date": "2022-01-01", - "title": "New Title", - "upload_type": "other", - "version": "1.0" - }, - "modified": "2022-01-01T00:00:00", - "owner": 115518, - "record_id": 1212568, - "state": "unsubmitted", - "submitted": false, - "title": "New Title" - }, - { - "conceptdoi": "10.5072/zenodo.1206119", - "conceptrecid": "1206119", - "created": "2022-01-01T00:00:00", - "doi": "10.5072/zenodo.1206120", - "doi_url": "https://doi.org/10.5072/zenodo.1206120", - "files": [ - { - "checksum": "762fc94bc138735cd70afc714a2db7b0", - "filename": "typetracer_0.1.1.006.tar.gz", - "filesize": 24499, - "id": "568d0149-29d0-4dcc-85eb-0cab65333cfc", - "links": { - "download": "sbapi/files/hash/typetracer_0.1.1.006.tar.gz", - "self": "sbapi/deposit/depositions/1206120/files/568d0149-29d0-4dcc-85eb-0cab65333cfc" - } - } - ], - "id": 1206120, - "links": { - "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206120.svg", - "bucket": "sbapi/files/4321a0d3-3414-4b55-bbbc-81e0f95f1bfd", - "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206119.svg", - "conceptdoi": "https://doi.org/10.5072/zenodo.1206119", - "discard": "sbapi/deposit/depositions/1206120/actions/discard", - "doi": "https://doi.org/10.5072/zenodo.1206120", - "edit": "sbapi/deposit/depositions/1206120/actions/edit", - "files": "sbapi/deposit/depositions/1206120/files", - "html": "https://sandbox.zenodo.org/deposit/1206120", - "latest": "sbapi/records/1206120", - "latest_html": "https://sandbox.zenodo.org/record/1206120", - "publish": "sbapi/deposit/depositions/1206120/actions/publish", - "record": "sbapi/records/1206120", - "record_html": "https://sandbox.zenodo.org/record/1206120", - "self": "sbapi/deposit/depositions/1206120" - }, - "metadata": { - "access_right": "closed", - "creators": [ - { - "name": "Mark Padgham", - "orcid": "0000-0003-2172-5265" - } - ], - "description": "
The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\nentire packages.<\/p>",
- "doi": "10.5072/zenodo.1206120",
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1206120",
- "recid": 1206120
- },
- "publication_date": "2022-01-01",
- "title": "Trace Function Parameter Types",
- "upload_type": "software",
- "version": "0.1.1.006"
- },
- "modified": "2022-01-01T00:00:00",
- "owner": 115518,
- "record_id": 1206120,
- "state": "done",
- "submitted": true,
- "title": "Trace Function Parameter Types"
- },
- {
- "conceptdoi": "10.5072/zenodo.1077311",
- "conceptrecid": "1077311",
- "created": "2022-01-01T00:00:00",
- "doi": "10.5072/zenodo.1077312",
- "doi_url": "https://doi.org/10.5072/zenodo.1077312",
- "files": [
- {
- "checksum": "3b6fd6ea9689be256621fb7fcc3cd81f",
- "filename": "DCEntry-1077312.xml",
- "filesize": 829,
- "id": "2b44d9ce-bf3f-45b1-8c59-dd24bcda6018",
- "links": {
- "download": "sbapi/files/hash/DCEntry-1077312.xml",
- "self": "sbapi/deposit/depositions/1077312/files/2b44d9ce-bf3f-45b1-8c59-dd24bcda6018"
- }
- },
- {
- "checksum": "2f66f32c95d5ff3ccd3ddd1cadc797b0",
- "filename": "RJwrapper.pdf",
- "filesize": 36414,
- "id": "cdc0fa50-4582-4830-a6b7-63999ce736c4",
- "links": {
- "download": "sbapi/files/hash/RJwrapper.pdf",
- "self": "sbapi/deposit/depositions/1077312/files/cdc0fa50-4582-4830-a6b7-63999ce736c4"
- }
- }
- ],
- "id": 1077312,
- "links": {
- "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077312.svg",
- "bucket": "sbapi/files/57f59a19-a514-4e97-9273-85a65bdd267e",
- "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077311.svg",
- "conceptdoi": "https://doi.org/10.5072/zenodo.1077311",
- "discard": "sbapi/deposit/depositions/1077312/actions/discard",
- "doi": "https://doi.org/10.5072/zenodo.1077312",
- "edit": "sbapi/deposit/depositions/1077312/actions/edit",
- "files": "sbapi/deposit/depositions/1077312/files",
- "html": "https://sandbox.zenodo.org/deposit/1077312",
- "latest": "sbapi/records/1077312",
- "latest_html": "https://sandbox.zenodo.org/record/1077312",
- "publish": "sbapi/deposit/depositions/1077312/actions/publish",
- "record": "sbapi/records/1077312",
- "record_html": "https://sandbox.zenodo.org/record/1077312",
- "self": "sbapi/deposit/depositions/1077312"
- },
- "metadata": {
- "access_right": "closed",
- "communities": [
- {
- "identifier": "zenodo"
- }
- ],
- "creators": [
- {
- "name": "P.S. Reynolds"
- }
- ],
- "description": "Updated source of 'beaver' data, in Chapter 11 of Lange, N., Ryan, L., Billard, L., Brillinger, D., Conquest, L. and Greenhouse, J. eds (1994) Case Studies in Biometry.",
- "doi": "10.5072/zenodo.1077312",
- "journal_title": "John Wiley and Sons",
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1077312",
- "recid": 1077312
- },
- "publication_date": "2022-01-01",
- "related_identifiers": [
- {
- "identifier": "ark:/13960/t0mt2n370",
- "relation": "isPartOf",
- "scheme": "ark"
- }
- ],
- "title": "Updated time-series analyses of beaver body temperatures.",
- "upload_type": "other"
- },
- "modified": "2022-01-01T00:00:00",
- "owner": 115518,
- "record_id": 1077312,
- "state": "inprogress",
- "submitted": true,
- "title": "Updated time-series analyses of beaver body temperatures."
- }
+
]
diff --git a/tests/testthat/zen_new/sbapi/deposit/depositions-7e4ccc-POST.R b/tests/testthat/zen_new/sbapi/deposit/depositions-7e4ccc-POST.R
new file mode 100644
index 00000000..b1a04ef2
--- /dev/null
+++ b/tests/testthat/zen_new/sbapi/deposit/depositions-7e4ccc-POST.R
@@ -0,0 +1,27 @@
+structure(list(method = "POST", url = "sbapi/deposit/depositions",
+ status_code = 201L, headers = structure(list(server = "nginx/1.24.0",
+ date = "Tue, 05 Dec 2023 14:51:37 GMT", `content-type` = "application/json",
+ `content-length` = "2021", etag = "\"5\"", `set-cookie` = "csrftoken=eyJhbGciOiJIUzUxMiIsImlhdCI6MTcwMTc4Nzg5NywiZXhwIjoxNzAxODc0Mjk3fQ.IkVZcFU4R1Fud1B1VGhGeVZnUk01Y2VGOEVWaWRvcWpPIg.ymao8cRrlxa641PPR9hCrJ5sXLZLbGr-t5zv5L-GUNUZCWyogvemjYZFtIEVYVj_SFG9CH35_BiEtfMjGVQtYA; Expires=Tue, 12 Dec 2023 14:51:37 GMT; Max-Age=604800; Secure; Path=/; SameSite=Lax",
+ `access-control-allow-origin` = "*", `access-control-expose-headers` = "Content-Type, ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset",
+ `x-ratelimit-limit` = "133", `x-ratelimit-remaining` = "132",
+ `x-ratelimit-reset` = "1701787957", `retry-after` = "59",
+ `permissions-policy` = "interest-cohort=()", `x-frame-options` = "sameorigin",
+ `x-xss-protection` = "1; mode=block", `x-content-type-options` = "nosniff",
+ `content-security-policy` = "default-src 'self' fonts.googleapis.com *.gstatic.com data: 'unsafe-inline' 'unsafe-eval' blob: zenodo-broker.web.cern.ch zenodo-broker-qa.web.cern.ch maxcdn.bootstrapcdn.com cdnjs.cloudflare.com ajax.googleapis.com webanalytics.web.cern.ch",
+ `strict-transport-security` = "max-age=31556926; includeSubDomains",
+ `referrer-policy` = "strict-origin-when-cross-origin",
+ `strict-transport-security` = "max-age=15768000", `x-request-id` = "217ee22d277d17ca4ab9bce89ae745d1",
+ `set-cookie` = "04f20c86f07421a9ec0f9d5ba4be544f=7705ef0ecdb4f5b5c6800bf05b654082; path=/; HttpOnly; Secure; SameSite=None",
+ connection = "close"), class = "httr2_headers"), body = charToRaw("{\"created\": \"2022-01-01T00:00:00+00:00\", \"modified\": \"2022-01-01T00:00:00+00:00\", \"id\": 6135, \"conceptrecid\": \"6134\", \"metadata\": {\"title\": \"New Title\", \"publication_date\": \"2022-01-01\", \"description\": \"## abstract\\\\n\\\\nThis is the abstract\\\\n\\\\n## description\\\\n\\\\nThis is the description\", \"access_right\": \"restricted\", \"creators\": [{\"name\": \"A. Person\", \"affiliation\": null}, {\"name\": \"B. Person\", \"affiliation\": null}], \"keywords\": [\"one\", \"two\", \"three\"], \"version\": \"1.0\", \"imprint_publisher\": \"Zenodo\", \"notes\": \"\\\\n\\\\n---start-deposits-meta---\\\\n{\\\"abstract\\\":\\\"This is the abstract\\\",\\\"accessRights\\\":\\\"closed\\\",\\\"creator\\\":[{\\\"name\\\":\\\"A. Person\\\"},{\\\"name\\\":\\\"B. Person\\\"}],\\\"description\\\":\\\"## description\\\\nThis is the description\\\\n\\\\n## version\\\\n1.0\\\",\\\"subject\\\":\\\"## keywords\\\\none, two\\\\nthree\\\",\\\"title\\\":\\\"New Title\\\"}\\\\n---end-deposits-meta---\\\\n\", \"upload_type\": \"other\", \"prereserve_doi\": {\"doi\": \"10.5281/zenodo.6135\", \"recid\": 6135}}, \"title\": \"New Title\", \"links\": {\"self\": \"sbapi/deposit/depositions/6135\", \"html\": \"https://sandbox.zenodo.org/deposit/6135\", \"badge\": \"https://sandbox.zenodo.org/badge/doi/.svg\", \"files\": \"sbapi/deposit/depositions/6135/files\", \"bucket\": \"sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e\", \"latest_draft\": \"sbapi/deposit/depositions/6135\", \"latest_draft_html\": \"https://sandbox.zenodo.org/deposit/6135\", \"publish\": \"sbapi/deposit/depositions/6135/actions/publish\", \"edit\": \"sbapi/deposit/depositions/6135/actions/edit\", \"discard\": \"sbapi/deposit/depositions/6135/actions/discard\", \"newversion\": \"sbapi/deposit/depositions/6135/actions/newversion\", \"registerconceptdoi\": \"sbapi/deposit/depositions/6135/actions/registerconceptdoi\"}, \"record_id\": 6135, \"owner\": 623, \"files\": [], \"state\": \"unsubmitted\", \"submitted\": false}"),
+ request = structure(list(url = "https://sandbox.zenodo.org/api/deposit/depositions",
+ method = "POST", headers = structure(list(Authorization = "Bearer 5BhlwRXYBj8LlyEiQtmYqeRklDjdMIKTsJM0jLN9UL8oWPFCbd7glEUpjBHz"), redact = character(0)),
+ body = list(data = list(metadata = list(access_right = "closed",
+ creators = list(list(name = "A. Person"), list(name = "B. Person")),
+ title = "New Title", version = "1.0", keywords = list(
+ "one", "two", "three"), description = "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ upload_type = "other", publication_date = "2022-01-01",
+ prereserve_doi = TRUE, notes = "\\n\\n---start-deposits-meta---\\n{\"abstract\":\"This is the abstract\",\"accessRights\":\"closed\",\"creator\":[{\"name\":\"A. Person\"},{\"name\":\"B. Person\"}],\"description\":\"## description\\nThis is the description\\n\\n## version\\n1.0\",\"subject\":\"## keywords\\none, two\\nthree\",\"title\":\"New Title\"}\\n---end-deposits-meta---\\n")),
+ type = "json", content_type = "application/json",
+ params = list(auto_unbox = TRUE, digits = 22, null = "null")),
+ fields = list(), options = list(), policies = list()), class = "httr2_request"),
+ cache = new.env(parent = emptyenv())), class = "httr2_response")
diff --git a/tests/testthat/zen_new/sbapi/deposit/depositions-df1c0b-POST.R b/tests/testthat/zen_new/sbapi/deposit/depositions-df1c0b-POST.R
deleted file mode 100644
index cd5ebac1..00000000
--- a/tests/testthat/zen_new/sbapi/deposit/depositions-df1c0b-POST.R
+++ /dev/null
@@ -1,13 +0,0 @@
-structure(list(method = "POST", url = "sbapi/deposit/depositions",
- status_code = 201L, headers = structure(list(Server = "nginx",
- Date = "Thu, 15 Jun 2023 12:22:19 GMT", `Content-Type` = "application/json",
- `Content-Length` = "1712", ETag = "\"0\"", `Last-Modified` = "Thu, 15 Jun 2023 12:22:19 GMT",
- Link = " The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\nentire packages.<\/p>",
- "doi": "10.5072/zenodo.1206120",
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1206120",
- "recid": 1206120
- },
- "publication_date": "2022-01-01",
- "title": "Trace Function Parameter Types",
- "upload_type": "software",
- "version": "0.1.1.006"
- },
- "modified": "2022-01-01T00:00:00",
- "owner": 115518,
- "record_id": 1206120,
- "state": "done",
- "submitted": true,
- "title": "Trace Function Parameter Types"
- },
- {
- "conceptdoi": "10.5072/zenodo.1077311",
- "conceptrecid": "1077311",
- "created": "2022-01-01T00:00:00",
- "doi": "10.5072/zenodo.1077312",
- "doi_url": "https://doi.org/10.5072/zenodo.1077312",
- "files": [
- {
- "checksum": "3b6fd6ea9689be256621fb7fcc3cd81f",
- "filename": "DCEntry-1077312.xml",
- "filesize": 829,
- "id": "2b44d9ce-bf3f-45b1-8c59-dd24bcda6018",
- "links": {
- "download": "sbapi/files/hash/DCEntry-1077312.xml",
- "self": "sbapi/deposit/depositions/1077312/files/2b44d9ce-bf3f-45b1-8c59-dd24bcda6018"
- }
- },
- {
- "checksum": "2f66f32c95d5ff3ccd3ddd1cadc797b0",
- "filename": "RJwrapper.pdf",
- "filesize": 36414,
- "id": "cdc0fa50-4582-4830-a6b7-63999ce736c4",
- "links": {
- "download": "sbapi/files/hash/RJwrapper.pdf",
- "self": "sbapi/deposit/depositions/1077312/files/cdc0fa50-4582-4830-a6b7-63999ce736c4"
- }
- }
- ],
- "id": 1077312,
- "links": {
- "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077312.svg",
- "bucket": "sbapi/files/57f59a19-a514-4e97-9273-85a65bdd267e",
- "conceptbadge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1077311.svg",
- "conceptdoi": "https://doi.org/10.5072/zenodo.1077311",
- "discard": "sbapi/deposit/depositions/1077312/actions/discard",
- "doi": "https://doi.org/10.5072/zenodo.1077312",
- "edit": "sbapi/deposit/depositions/1077312/actions/edit",
- "files": "sbapi/deposit/depositions/1077312/files",
- "html": "https://sandbox.zenodo.org/deposit/1077312",
- "latest": "sbapi/records/1077312",
- "latest_html": "https://sandbox.zenodo.org/record/1077312",
- "publish": "sbapi/deposit/depositions/1077312/actions/publish",
- "record": "sbapi/records/1077312",
- "record_html": "https://sandbox.zenodo.org/record/1077312",
- "self": "sbapi/deposit/depositions/1077312"
- },
- "metadata": {
- "access_right": "closed",
- "communities": [
- {
- "identifier": "zenodo"
- }
- ],
- "creators": [
- {
- "name": "P.S. Reynolds"
- }
- ],
- "description": "Updated source of 'beaver' data, in Chapter 11 of Lange, N., Ryan, L., Billard, L., Brillinger, D., Conquest, L. and Greenhouse, J. eds (1994) Case Studies in Biometry.",
- "doi": "10.5072/zenodo.1077312",
- "journal_title": "John Wiley and Sons",
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1077312",
- "recid": 1077312
- },
- "publication_date": "2022-01-01",
- "related_identifiers": [
- {
- "identifier": "ark:/13960/t0mt2n370",
- "relation": "isPartOf",
- "scheme": "ark"
- }
- ],
- "title": "Updated time-series analyses of beaver body temperatures.",
- "upload_type": "other"
- },
- "modified": "2022-01-01T00:00:00",
- "owner": 115518,
- "record_id": 1077312,
- "state": "inprogress",
- "submitted": true,
- "title": "Updated time-series analyses of beaver body temperatures."
- }
+
]
diff --git a/tests/testthat/zen_retr/sbapi/deposit/depositions/1212568.json b/tests/testthat/zen_retr/sbapi/deposit/depositions/1212568.json
deleted file mode 100644
index 7ce74947..00000000
--- a/tests/testthat/zen_retr/sbapi/deposit/depositions/1212568.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "",
- "doi_url": "https://doi.org/",
- "files": [
-
- ],
- "id": 1212568,
- "links": {
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "A. Person"
- },
- {
- "name": "B. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "notes": "\\n\\n---start-deposits-meta---\\n{\"abstract\":\"This is the abstract\",\"accessRights\":\"closed\",\"creator\":[{\"name\":\"A. Person\"},{\"name\":\"B. Person\"}],\"description\":\"## description\\nThis is the description\\n\\n## version\\n1.0\",\"subject\":\"## keywords\\none, two\\nthree\",\"title\":\"New Title\"}\\n---end-deposits-meta---\\n",
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "New Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "New Title"
-}
diff --git a/tests/testthat/zen_retr/sbapi/deposit/depositions/6135.json b/tests/testthat/zen_retr/sbapi/deposit/depositions/6135.json
new file mode 100644
index 00000000..2a0f1c83
--- /dev/null
+++ b/tests/testthat/zen_retr/sbapi/deposit/depositions/6135.json
@@ -0,0 +1,57 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "metadata": {
+ "title": "New Title",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "A. Person",
+ "affiliation": null
+ },
+ {
+ "name": "B. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "notes": "\\n\\n---start-deposits-meta---\\n{\"abstract\":\"This is the abstract\",\"accessRights\":\"closed\",\"creator\":[{\"name\":\"A. Person\"},{\"name\":\"B. Person\"}],\"description\":\"## description\\nThis is the description\\n\\n## version\\n1.0\",\"subject\":\"## keywords\\none, two\\nthree\",\"title\":\"New Title\"}\\n---end-deposits-meta---\\n",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "New Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_up/sbapi/deposit/depositions/1212568-684f1f-PUT.json b/tests/testthat/zen_up/sbapi/deposit/depositions/1212568-684f1f-PUT.json
deleted file mode 100644
index bda57feb..00000000
--- a/tests/testthat/zen_up/sbapi/deposit/depositions/1212568-684f1f-PUT.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "10.5072/zenodo.1212568",
- "doi_url": "https://doi.org/10.5072/zenodo.1212568",
- "files": [
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data.csv",
- "filesize": 625,
- "id": "338840b3-793c-4a11-981f-834c69623438",
- "links": {
- "download": "sbapi/files/hash/data.csv",
- "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438"
- }
- }
- ],
- "id": 1212568,
- "links": {
- "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg",
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "doi": "https://doi.org/10.5072/zenodo.1212568",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "A. Person"
- },
- {
- "name": "B. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "10.5072/zenodo.1212568",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "New Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "New Title"
-}
diff --git a/tests/testthat/zen_up/sbapi/deposit/depositions/1212568.json b/tests/testthat/zen_up/sbapi/deposit/depositions/1212568.json
deleted file mode 100644
index bda57feb..00000000
--- a/tests/testthat/zen_up/sbapi/deposit/depositions/1212568.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "10.5072/zenodo.1212568",
- "doi_url": "https://doi.org/10.5072/zenodo.1212568",
- "files": [
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data.csv",
- "filesize": 625,
- "id": "338840b3-793c-4a11-981f-834c69623438",
- "links": {
- "download": "sbapi/files/hash/data.csv",
- "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438"
- }
- }
- ],
- "id": 1212568,
- "links": {
- "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg",
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "doi": "https://doi.org/10.5072/zenodo.1212568",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "A. Person"
- },
- {
- "name": "B. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "10.5072/zenodo.1212568",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "New Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "New Title"
-}
diff --git a/tests/testthat/zen_up/sbapi/deposit/depositions/6135-066b01-PUT.json b/tests/testthat/zen_up/sbapi/deposit/depositions/6135-066b01-PUT.json
new file mode 100644
index 00000000..1513b4bd
--- /dev/null
+++ b/tests/testthat/zen_up/sbapi/deposit/depositions/6135-066b01-PUT.json
@@ -0,0 +1,69 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "doi": "10.5281/zenodo.6135",
+ "doi_url": "https://doi.org/10.5281/zenodo.6135",
+ "metadata": {
+ "title": "New Title",
+ "doi": "10.5281/zenodo.6135",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "A. Person",
+ "affiliation": null
+ },
+ {
+ "name": "B. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "New Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "doi": "https://doi.org/10.5281/zenodo.6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+ {
+ "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "filename": "data.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "download": "sbapi/records/6135/draft/files/data.csv/content"
+ }
+ }
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_up/sbapi/deposit/depositions/6135.json b/tests/testthat/zen_up/sbapi/deposit/depositions/6135.json
new file mode 100644
index 00000000..1513b4bd
--- /dev/null
+++ b/tests/testthat/zen_up/sbapi/deposit/depositions/6135.json
@@ -0,0 +1,69 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "doi": "10.5281/zenodo.6135",
+ "doi_url": "https://doi.org/10.5281/zenodo.6135",
+ "metadata": {
+ "title": "New Title",
+ "doi": "10.5281/zenodo.6135",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "A. Person",
+ "affiliation": null
+ },
+ {
+ "name": "B. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "New Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "doi": "https://doi.org/10.5281/zenodo.6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+ {
+ "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "filename": "data.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "download": "sbapi/records/6135/draft/files/data.csv/content"
+ }
+ }
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_up/sbapi/files/hash/data.csv-861b94-PUT.R b/tests/testthat/zen_up/sbapi/files/hash/data.csv-861b94-PUT.R
new file mode 100644
index 00000000..b29782dd
--- /dev/null
+++ b/tests/testthat/zen_up/sbapi/files/hash/data.csv-861b94-PUT.R
@@ -0,0 +1,22 @@
+structure(list(method = "PUT", url = "sbapi/files/hash/data.csv",
+ status_code = 201L, headers = structure(list(server = "nginx/1.24.0",
+ date = "Tue, 05 Dec 2023 14:51:43 GMT", `content-type` = "application/json",
+ `content-length` = "651", `x-ratelimit-limit` = "1000",
+ `x-ratelimit-remaining` = "990", `x-ratelimit-reset` = "1701787963",
+ `retry-after` = "59", `permissions-policy` = "interest-cohort=()",
+ `x-frame-options` = "sameorigin", `x-xss-protection` = "1; mode=block",
+ `x-content-type-options` = "nosniff", `content-security-policy` = "default-src 'self' fonts.googleapis.com *.gstatic.com data: 'unsafe-inline' 'unsafe-eval' blob: zenodo-broker.web.cern.ch zenodo-broker-qa.web.cern.ch maxcdn.bootstrapcdn.com cdnjs.cloudflare.com ajax.googleapis.com webanalytics.web.cern.ch",
+ `strict-transport-security` = "max-age=31556926; includeSubDomains",
+ `referrer-policy` = "strict-origin-when-cross-origin",
+ `set-cookie` = "csrftoken=eyJhbGciOiJIUzUxMiIsImlhdCI6MTcwMTc4NzkwMywiZXhwIjoxNzAxODc0MzAzfQ.Ik45QmZUU3pVWVg5aVpPZzMyVFB3ZFk2V0NWaklSVGNoIg.906B7AEy8qqBh5AzIRFVTL3S6XZCMaTU5-o8L6Vo7sFuA5_kXEOuaaZk9XWXXgLxRGKKJYyKHWdUX4ACqDr8Qg; Expires=Tue, 12 Dec 2023 14:51:43 GMT; Max-Age=604800; Secure; Path=/; SameSite=Lax",
+ `access-control-allow-origin` = "*", `access-control-expose-headers` = "Content-Type, ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset",
+ `strict-transport-security` = "max-age=15768000", `x-request-id` = "55e8b4f48e1b7c7c4104da4e0df34a97",
+ `set-cookie` = "04f20c86f07421a9ec0f9d5ba4be544f=7705ef0ecdb4f5b5c6800bf05b654082; path=/; HttpOnly; Secure; SameSite=None"), class = "httr2_headers"),
+ body = charToRaw("{\"created\": \"2022-01-01T00:00:00+00:00\", \"updated\": \"2022-01-01T00:00:00+00:00\", \"version_id\": \"9ae5af59-cdc4-45b7-84d2-ab17b0aa87ab\", \"key\": \"data.csv\", \"size\": 625, \"mimetype\": \"text/csv\", \"checksum\": \"md5:cc624d72ede85ef061afa494d9951f6f\", \"is_head\": true, \"delete_marker\": false, \"links\": {\"self\": \"sbapi/files/hash/data.csv\", \"version\": \"sbapi/files/hash/data.csv?versionId=9ae5af59-cdc4-45b7-84d2-ab17b0aa87ab\", \"uploads\": \"sbapi/files/hash/data.csv?uploads\"}}"),
+ request = structure(list(url = "https://sandbox.zenodo.org/api/files/1565343c-0039-4c00-a989-6aa546bbea9e/data.csv",
+ method = "PUT", headers = list(Authorization = "Bearer 5BhlwRXYBj8LlyEiQtmYqeRklDjdMIKTsJM0jLN9UL8oWPFCbd7glEUpjBHz",
+ `Content-Type` = "application/octet-stream"), body = list(
+ data = structure("/tmp/RtmpJvdhOm/data.csv", class = "httr2_path"),
+ type = "raw-file", content_type = "", params = list()),
+ fields = list(), options = list(), policies = list()), class = "httr2_request"),
+ cache = new.env(parent = emptyenv())), class = "httr2_response")
diff --git a/tests/testthat/zen_up/sbapi/files/hash/data.csv-861b94-PUT.json b/tests/testthat/zen_up/sbapi/files/hash/data.csv-861b94-PUT.json
deleted file mode 100644
index 1e48ea3b..00000000
--- a/tests/testthat/zen_up/sbapi/files/hash/data.csv-861b94-PUT.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "mimetype": "text/csv",
- "updated": "2022-01-01T00:00:00+00:00",
- "links": {
- "self": "sbapi/files/hash/data.csv",
- "version": "sbapi/files/hash/data.csv?versionId=efe52b08-6f91-49a0-9d10-dcc1e9b4083c",
- "uploads": "sbapi/files/hash/data.csv?uploads"
- },
- "is_head": true,
- "created": "2022-01-01T00:00:00+00:00",
- "checksum": "md5:cc624d72ede85ef061afa494d9951f6f",
- "version_id": "efe52b08-6f91-49a0-9d10-dcc1e9b4083c",
- "delete_marker": false,
- "key": "data.csv",
- "size": 625
-}
diff --git a/tests/testthat/zen_up2/sbapi/deposit/depositions/1212568-684f1f-PUT.json b/tests/testthat/zen_up2/sbapi/deposit/depositions/1212568-684f1f-PUT.json
deleted file mode 100644
index 328f7a3b..00000000
--- a/tests/testthat/zen_up2/sbapi/deposit/depositions/1212568-684f1f-PUT.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "10.5072/zenodo.1212568",
- "doi_url": "https://doi.org/10.5072/zenodo.1212568",
- "files": [
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data2.csv",
- "filesize": 625,
- "id": "d09dbc95-d0b1-4160-991e-6a1cd5a65438",
- "links": {
- "download": "sbapi/files/hash/data2.csv",
- "self": "sbapi/deposit/depositions/1212568/files/d09dbc95-d0b1-4160-991e-6a1cd5a65438"
- }
- },
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data.csv",
- "filesize": 625,
- "id": "338840b3-793c-4a11-981f-834c69623438",
- "links": {
- "download": "sbapi/files/hash/data.csv",
- "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438"
- }
- }
- ],
- "id": 1212568,
- "links": {
- "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg",
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "doi": "https://doi.org/10.5072/zenodo.1212568",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "A. Person"
- },
- {
- "name": "B. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "10.5072/zenodo.1212568",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "New Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "New Title"
-}
diff --git a/tests/testthat/zen_up2/sbapi/deposit/depositions/1212568.json b/tests/testthat/zen_up2/sbapi/deposit/depositions/1212568.json
deleted file mode 100644
index 328f7a3b..00000000
--- a/tests/testthat/zen_up2/sbapi/deposit/depositions/1212568.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "10.5072/zenodo.1212568",
- "doi_url": "https://doi.org/10.5072/zenodo.1212568",
- "files": [
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data2.csv",
- "filesize": 625,
- "id": "d09dbc95-d0b1-4160-991e-6a1cd5a65438",
- "links": {
- "download": "sbapi/files/hash/data2.csv",
- "self": "sbapi/deposit/depositions/1212568/files/d09dbc95-d0b1-4160-991e-6a1cd5a65438"
- }
- },
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data.csv",
- "filesize": 625,
- "id": "338840b3-793c-4a11-981f-834c69623438",
- "links": {
- "download": "sbapi/files/hash/data.csv",
- "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438"
- }
- }
- ],
- "id": 1212568,
- "links": {
- "badge": "https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1212568.svg",
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "doi": "https://doi.org/10.5072/zenodo.1212568",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "A. Person"
- },
- {
- "name": "B. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "10.5072/zenodo.1212568",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "New Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "New Title"
-}
diff --git a/tests/testthat/zen_up2/sbapi/deposit/depositions/6135-066b01-PUT.json b/tests/testthat/zen_up2/sbapi/deposit/depositions/6135-066b01-PUT.json
new file mode 100644
index 00000000..08cc856d
--- /dev/null
+++ b/tests/testthat/zen_up2/sbapi/deposit/depositions/6135-066b01-PUT.json
@@ -0,0 +1,79 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "doi": "10.5281/zenodo.6135",
+ "doi_url": "https://doi.org/10.5281/zenodo.6135",
+ "metadata": {
+ "title": "New Title",
+ "doi": "10.5281/zenodo.6135",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "A. Person",
+ "affiliation": null
+ },
+ {
+ "name": "B. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "New Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "doi": "https://doi.org/10.5281/zenodo.6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+ {
+ "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "filename": "data.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "download": "sbapi/records/6135/draft/files/data.csv/content"
+ }
+ },
+ {
+ "id": "b9737f56-d53b-4efc-86cf-1774b66fccd9",
+ "filename": "data2.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/b9737f56-d53b-4efc-86cf-1774b66fccd9",
+ "download": "sbapi/records/6135/draft/files/data2.csv/content"
+ }
+ }
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_up2/sbapi/deposit/depositions/6135.json b/tests/testthat/zen_up2/sbapi/deposit/depositions/6135.json
new file mode 100644
index 00000000..08cc856d
--- /dev/null
+++ b/tests/testthat/zen_up2/sbapi/deposit/depositions/6135.json
@@ -0,0 +1,79 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "doi": "10.5281/zenodo.6135",
+ "doi_url": "https://doi.org/10.5281/zenodo.6135",
+ "metadata": {
+ "title": "New Title",
+ "doi": "10.5281/zenodo.6135",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "A. Person",
+ "affiliation": null
+ },
+ {
+ "name": "B. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "New Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "doi": "https://doi.org/10.5281/zenodo.6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+ {
+ "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "filename": "data.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "download": "sbapi/records/6135/draft/files/data.csv/content"
+ }
+ },
+ {
+ "id": "b9737f56-d53b-4efc-86cf-1774b66fccd9",
+ "filename": "data2.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/b9737f56-d53b-4efc-86cf-1774b66fccd9",
+ "download": "sbapi/records/6135/draft/files/data2.csv/content"
+ }
+ }
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_up2/sbapi/files/hash/data2.csv-861b94-PUT.R b/tests/testthat/zen_up2/sbapi/files/hash/data2.csv-861b94-PUT.R
new file mode 100644
index 00000000..7e495206
--- /dev/null
+++ b/tests/testthat/zen_up2/sbapi/files/hash/data2.csv-861b94-PUT.R
@@ -0,0 +1,22 @@
+structure(list(method = "PUT", url = "sbapi/files/hash/data2.csv",
+ status_code = 201L, headers = structure(list(server = "nginx/1.24.0",
+ date = "Tue, 05 Dec 2023 14:51:44 GMT", `content-type` = "application/json",
+ `content-length` = "655", `x-ratelimit-limit` = "1000",
+ `x-ratelimit-remaining` = "986", `x-ratelimit-reset` = "1701787965",
+ `retry-after` = "60", `permissions-policy` = "interest-cohort=()",
+ `x-frame-options` = "sameorigin", `x-xss-protection` = "1; mode=block",
+ `x-content-type-options` = "nosniff", `content-security-policy` = "default-src 'self' fonts.googleapis.com *.gstatic.com data: 'unsafe-inline' 'unsafe-eval' blob: zenodo-broker.web.cern.ch zenodo-broker-qa.web.cern.ch maxcdn.bootstrapcdn.com cdnjs.cloudflare.com ajax.googleapis.com webanalytics.web.cern.ch",
+ `strict-transport-security` = "max-age=31556926; includeSubDomains",
+ `referrer-policy` = "strict-origin-when-cross-origin",
+ `set-cookie` = "csrftoken=eyJhbGciOiJIUzUxMiIsImlhdCI6MTcwMTc4NzkwNCwiZXhwIjoxNzAxODc0MzA0fQ.IndkNmFtVXJtUDRBUHE4UGtMTTFBcEg4cFNTSnk5TWp4Ig.qTWh_AQuI7laneu7frJaRUJOYxmZrVGjMFUEYqkBL_GI4mty1agd4Crl7aJBL14462vYI0SqYW8VySPzJzuE6w; Expires=Tue, 12 Dec 2023 14:51:44 GMT; Max-Age=604800; Secure; Path=/; SameSite=Lax",
+ `access-control-allow-origin` = "*", `access-control-expose-headers` = "Content-Type, ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset",
+ `strict-transport-security` = "max-age=15768000", `x-request-id` = "053832b65549d76f754d70d0b9b1d364",
+ `set-cookie` = "04f20c86f07421a9ec0f9d5ba4be544f=7705ef0ecdb4f5b5c6800bf05b654082; path=/; HttpOnly; Secure; SameSite=None"), class = "httr2_headers"),
+ body = charToRaw("{\"created\": \"2022-01-01T00:00:00+00:00\", \"updated\": \"2022-01-01T00:00:00+00:00\", \"version_id\": \"6ad92a1b-6adb-4da8-8049-3eacb50ccdc2\", \"key\": \"data2.csv\", \"size\": 625, \"mimetype\": \"text/csv\", \"checksum\": \"md5:cc624d72ede85ef061afa494d9951f6f\", \"is_head\": true, \"delete_marker\": false, \"links\": {\"self\": \"sbapi/files/hash/data2.csv\", \"version\": \"sbapi/files/hash/data2.csv?versionId=6ad92a1b-6adb-4da8-8049-3eacb50ccdc2\", \"uploads\": \"sbapi/files/hash/data2.csv?uploads\"}}"),
+ request = structure(list(url = "https://sandbox.zenodo.org/api/files/1565343c-0039-4c00-a989-6aa546bbea9e/data2.csv",
+ method = "PUT", headers = list(Authorization = "Bearer 5BhlwRXYBj8LlyEiQtmYqeRklDjdMIKTsJM0jLN9UL8oWPFCbd7glEUpjBHz",
+ `Content-Type` = "application/octet-stream"), body = list(
+ data = structure("/tmp/RtmpJvdhOm/data2.csv", class = "httr2_path"),
+ type = "raw-file", content_type = "", params = list()),
+ fields = list(), options = list(), policies = list()), class = "httr2_request"),
+ cache = new.env(parent = emptyenv())), class = "httr2_response")
diff --git a/tests/testthat/zen_up2/sbapi/files/hash/data2.csv-861b94-PUT.json b/tests/testthat/zen_up2/sbapi/files/hash/data2.csv-861b94-PUT.json
deleted file mode 100644
index 315c5950..00000000
--- a/tests/testthat/zen_up2/sbapi/files/hash/data2.csv-861b94-PUT.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "mimetype": "text/csv",
- "updated": "2022-01-01T00:00:00+00:00",
- "links": {
- "self": "sbapi/files/hash/data2.csv",
- "version": "sbapi/files/hash/data2.csv?versionId=457bc869-64e2-4285-80d5-4021d9ec0fb4",
- "uploads": "sbapi/files/hash/data2.csv?uploads"
- },
- "is_head": true,
- "created": "2022-01-01T00:00:00+00:00",
- "checksum": "md5:cc624d72ede85ef061afa494d9951f6f",
- "version_id": "457bc869-64e2-4285-80d5-4021d9ec0fb4",
- "delete_marker": false,
- "key": "data2.csv",
- "size": 625
-}
diff --git a/tests/testthat/zen_update/sbapi/deposit/depositions/1212568-8575df-PUT.json b/tests/testthat/zen_update/sbapi/deposit/depositions/1212568-8575df-PUT.json
deleted file mode 100644
index 98375ac1..00000000
--- a/tests/testthat/zen_update/sbapi/deposit/depositions/1212568-8575df-PUT.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "",
- "doi_url": "https://doi.org/",
- "files": [
-
- ],
- "id": 1212568,
- "links": {
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "C. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the modified abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "Modified Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "Modified Title"
-}
diff --git a/tests/testthat/zen_update/sbapi/deposit/depositions/1212568.json b/tests/testthat/zen_update/sbapi/deposit/depositions/1212568.json
deleted file mode 100644
index 98375ac1..00000000
--- a/tests/testthat/zen_update/sbapi/deposit/depositions/1212568.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "",
- "doi_url": "https://doi.org/",
- "files": [
-
- ],
- "id": 1212568,
- "links": {
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "C. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the modified abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "Modified Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "Modified Title"
-}
diff --git a/tests/testthat/zen_update/sbapi/deposit/depositions/6135-d7c625-PUT.json b/tests/testthat/zen_update/sbapi/deposit/depositions/6135-d7c625-PUT.json
new file mode 100644
index 00000000..0b297a8e
--- /dev/null
+++ b/tests/testthat/zen_update/sbapi/deposit/depositions/6135-d7c625-PUT.json
@@ -0,0 +1,52 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "metadata": {
+ "title": "Modified Title",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the modified abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "C. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "Modified Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_update/sbapi/deposit/depositions/6135.json b/tests/testthat/zen_update/sbapi/deposit/depositions/6135.json
new file mode 100644
index 00000000..0b297a8e
--- /dev/null
+++ b/tests/testthat/zen_update/sbapi/deposit/depositions/6135.json
@@ -0,0 +1,52 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "metadata": {
+ "title": "Modified Title",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the modified abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "C. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "Modified Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_update_dp/sbapi/deposit/depositions/1212568-85e8fa-PUT.json b/tests/testthat/zen_update_dp/sbapi/deposit/depositions/1212568-85e8fa-PUT.json
deleted file mode 100644
index fa4e2176..00000000
--- a/tests/testthat/zen_update_dp/sbapi/deposit/depositions/1212568-85e8fa-PUT.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "conceptrecid": "1212567",
- "created": "2022-01-01T00:00:00+00:00",
- "doi": "",
- "doi_url": "https://doi.org/",
- "files": [
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data2.csv",
- "filesize": 625,
- "id": "d09dbc95-d0b1-4160-991e-6a1cd5a65438",
- "links": {
- "download": "sbapi/files/hash/data2.csv",
- "self": "sbapi/deposit/depositions/1212568/files/d09dbc95-d0b1-4160-991e-6a1cd5a65438"
- }
- },
- {
- "checksum": "cc624d72ede85ef061afa494d9951f6f",
- "filename": "data.csv",
- "filesize": 625,
- "id": "338840b3-793c-4a11-981f-834c69623438",
- "links": {
- "download": "sbapi/files/hash/data.csv",
- "self": "sbapi/deposit/depositions/1212568/files/338840b3-793c-4a11-981f-834c69623438"
- }
- }
- ],
- "id": 1212568,
- "links": {
- "bucket": "sbapi/files/6fd82ad2-3cb2-4bf9-bfd2-83e38ecb7acc",
- "discard": "sbapi/deposit/depositions/1212568/actions/discard",
- "edit": "sbapi/deposit/depositions/1212568/actions/edit",
- "files": "sbapi/deposit/depositions/1212568/files",
- "html": "https://sandbox.zenodo.org/deposit/1212568",
- "latest_draft": "sbapi/deposit/depositions/1212568",
- "latest_draft_html": "https://sandbox.zenodo.org/deposit/1212568",
- "newversion": "sbapi/deposit/depositions/1212568/actions/newversion",
- "publish": "sbapi/deposit/depositions/1212568/actions/publish",
- "registerconceptdoi": "sbapi/deposit/depositions/1212568/actions/registerconceptdoi",
- "self": "sbapi/deposit/depositions/1212568"
- },
- "metadata": {
- "access_right": "closed",
- "creators": [
- {
- "name": "A. Person"
- },
- {
- "name": "B. Person"
- }
- ],
- "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
- "doi": "",
- "keywords": [
- "one",
- "two",
- "three"
- ],
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212568",
- "recid": 1212568
- },
- "publication_date": "2022-01-01",
- "title": "New Title",
- "upload_type": "other",
- "version": "1.0"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212568,
- "state": "unsubmitted",
- "submitted": false,
- "title": "New Title"
-}
diff --git a/tests/testthat/zen_update_dp/sbapi/deposit/depositions/6135-34ba63-PUT.json b/tests/testthat/zen_update_dp/sbapi/deposit/depositions/6135-34ba63-PUT.json
new file mode 100644
index 00000000..08cc856d
--- /dev/null
+++ b/tests/testthat/zen_update_dp/sbapi/deposit/depositions/6135-34ba63-PUT.json
@@ -0,0 +1,79 @@
+{
+ "created": "2022-01-01T00:00:00+00:00",
+ "modified": "2022-01-01T00:00:00+00:00",
+ "id": 6135,
+ "conceptrecid": "6134",
+ "doi": "10.5281/zenodo.6135",
+ "doi_url": "https://doi.org/10.5281/zenodo.6135",
+ "metadata": {
+ "title": "New Title",
+ "doi": "10.5281/zenodo.6135",
+ "publication_date": "2022-01-01",
+ "description": "## abstract\\n\\nThis is the abstract\\n\\n## description\\n\\nThis is the description",
+ "access_right": "restricted",
+ "creators": [
+ {
+ "name": "A. Person",
+ "affiliation": null
+ },
+ {
+ "name": "B. Person",
+ "affiliation": null
+ }
+ ],
+ "keywords": [
+ "one",
+ "two",
+ "three"
+ ],
+ "version": "1.0",
+ "imprint_publisher": "Zenodo",
+ "upload_type": "other",
+ "prereserve_doi": {
+ "doi": "10.5281/zenodo.6135",
+ "recid": 6135
+ }
+ },
+ "title": "New Title",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135",
+ "html": "https://sandbox.zenodo.org/deposit/6135",
+ "doi": "https://doi.org/10.5281/zenodo.6135",
+ "badge": "https://sandbox.zenodo.org/badge/doi/10.5281%2Fzenodo.6135.svg",
+ "files": "sbapi/deposit/depositions/6135/files",
+ "bucket": "sbapi/files/1565343c-0039-4c00-a989-6aa546bbea9e",
+ "latest_draft": "sbapi/deposit/depositions/6135",
+ "latest_draft_html": "https://sandbox.zenodo.org/deposit/6135",
+ "publish": "sbapi/deposit/depositions/6135/actions/publish",
+ "edit": "sbapi/deposit/depositions/6135/actions/edit",
+ "discard": "sbapi/deposit/depositions/6135/actions/discard",
+ "newversion": "sbapi/deposit/depositions/6135/actions/newversion",
+ "registerconceptdoi": "sbapi/deposit/depositions/6135/actions/registerconceptdoi"
+ },
+ "record_id": 6135,
+ "owner": 623,
+ "files": [
+ {
+ "id": "f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "filename": "data.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/f241e267-51ac-4cc8-886d-9d5fb6500ac3",
+ "download": "sbapi/records/6135/draft/files/data.csv/content"
+ }
+ },
+ {
+ "id": "b9737f56-d53b-4efc-86cf-1774b66fccd9",
+ "filename": "data2.csv",
+ "filesize": 625,
+ "checksum": "cc624d72ede85ef061afa494d9951f6f",
+ "links": {
+ "self": "sbapi/deposit/depositions/6135/files/b9737f56-d53b-4efc-86cf-1774b66fccd9",
+ "download": "sbapi/records/6135/draft/files/data2.csv/content"
+ }
+ }
+ ],
+ "state": "unsubmitted",
+ "submitted": false
+}
diff --git a/tests/testthat/zen_vers/sbapi/deposit/depositions/1206120/actions/newversion-POST.R b/tests/testthat/zen_vers/sbapi/deposit/depositions/1206120/actions/newversion-POST.R
deleted file mode 100644
index 529aa602..00000000
--- a/tests/testthat/zen_vers/sbapi/deposit/depositions/1206120/actions/newversion-POST.R
+++ /dev/null
@@ -1,12 +0,0 @@
-structure(list(method = "POST", url = "sbapi/deposit/depositions/1206120/actions/newversion",
- status_code = 201L, headers = structure(list(Server = "nginx",
- Date = "Thu, 15 Jun 2023 12:22:37 GMT", `Content-Type` = "application/json",
- `Content-Length` = "2275", ETag = "\"39\"", `Last-Modified` = "Thu, 15 Jun 2023 11:17:42 GMT",
- Location = "sbapi/deposit/depositions/1206120", `X-RateLimit-Limit` = "100",
- `X-RateLimit-Remaining` = "71", `X-RateLimit-Reset` = "1686831817",
- `Retry-After` = "59", `X-Frame-Options` = "sameorigin",
- `X-XSS-Protection` = "1; mode=block", `X-Content-Type-Options` = "nosniff",
- `Strict-Transport-Security` = "max-age=0", `Referrer-Policy` = "strict-origin-when-cross-origin",
- `Access-Control-Allow-Origin` = "*", `Access-Control-Expose-Headers` = "Content-Type, ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset",
- `X-User-ID` = "115518", `X-Request-ID` = "90a3f08818bb7ba37ba15273a857e3f6"), class = "httr2_headers"),
- body = charToRaw("{\"conceptdoi\":\"10.5072/zenodo.1206119\",\"conceptrecid\":\"1206119\",\"created\":\"2022-01-01T00:00:00+00:00\",\"doi\":\"10.5072/zenodo.1206120\",\"doi_url\":\"https://doi.org/10.5072/zenodo.1206120\",\"files\":[{\"checksum\":\"762fc94bc138735cd70afc714a2db7b0\",\"filename\":\"typetracer_0.1.1.006.tar.gz\",\"filesize\":24499,\"id\":\"568d0149-29d0-4dcc-85eb-0cab65333cfc\",\"links\":{\"download\":\"sbapi/files/hash/typetracer_0.1.1.006.tar.gz\",\"self\":\"sbapi/deposit/depositions/1206120/files/568d0149-29d0-4dcc-85eb-0cab65333cfc\"}}],\"id\":1206120,\"links\":{\"badge\":\"https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206120.svg\",\"bucket\":\"sbapi/files/4321a0d3-3414-4b55-bbbc-81e0f95f1bfd\",\"conceptbadge\":\"https://sandbox.zenodo.org/badge/doi/10.5072/zenodo.1206119.svg\",\"conceptdoi\":\"https://doi.org/10.5072/zenodo.1206119\",\"doi\":\"https://doi.org/10.5072/zenodo.1206120\",\"latest\":\"sbapi/records/1206120\",\"latest_draft\":\"sbapi/deposit/depositions/1212569\",\"latest_draft_html\":\"https://sandbox.zenodo.org/deposit/1212569\",\"latest_html\":\"https://sandbox.zenodo.org/record/1206120\",\"record\":\"sbapi/records/1206120\",\"record_html\":\"https://sandbox.zenodo.org/record/1206120\"},\"metadata\":{\"access_right\":\"closed\",\"creators\":[{\"name\":\"Mark Padgham\",\"orcid\":\"0000-0003-2172-5265\"}],\"description\":\" The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\\\nentire packages. The 'R' language includes a set of defined types, but the language itself is "absurdly dynamic" (Turcotte & Vitek (2019)\\n), and lacks any way to specify which types are expected by any expression. The 'typetracer' package enables code to be traced to extract detailed information on the properties of parameters\\npassed to 'R' functions. 'typetracer' can trace individual functions or\\nentire packages.<\/p>",
- "doi": "10.5072/zenodo.1212569",
- "prereserve_doi": {
- "doi": "10.5072/zenodo.1212569",
- "recid": 1212569
- },
- "publication_date": "2022-01-01",
- "title": "Trace Function Parameter Types",
- "upload_type": "other",
- "version": "0.1.1.007"
- },
- "modified": "2022-01-01T00:00:00+00:00",
- "owner": 115518,
- "record_id": 1212569,
- "state": "unsubmitted",
- "submitted": false,
- "title": "Trace Function Parameter Types"
-}