Skip to content

Commit

Permalink
remove httptest2 API mocking infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Aariq committed Dec 11, 2023
1 parent 5a08de0 commit c61c12d
Show file tree
Hide file tree
Showing 30 changed files with 282 additions and 11,617 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Suggests:
covr,
ggplot2,
glue,
httptest2,
knitr,
rmarkdown,
testthat (>= 3.0.0),
Expand Down
18 changes: 10 additions & 8 deletions inst/httptest/redact.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#shortens file paths created by httptest2 so that R CMD check doesn't complain
httptest2::set_redactor(
function (resp) {
resp %>%
httptest2::gsub_response("api.azmet.arizona.edu/v1/observations/", "") %>%
httptest2::gsub_response("\\*", "default") #asterix is not valid dir name on all OS
}
)
## httptest2 isn't currently used, but if it is used for API mocking in the future, this will be helpful

##shortens file paths created by httptest2 so that R CMD check doesn't complain
# httptest2::set_redactor(
# function (resp) {
# resp %>%
# httptest2::gsub_response("api.azmet.arizona.edu/v1/observations/", "") %>%
# httptest2::gsub_response("\\*", "default") #asterix is not valid dir name on all OS
# }
# )
244 changes: 0 additions & 244 deletions tests/testthat/add_units_mocks/daily/az01/2023-11-27T00-00/P2D.json

This file was deleted.

Loading

0 comments on commit c61c12d

Please sign in to comment.