You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off @nealrichardson, thanks so much for this awesome package! I've just started switching all my pkgs over to httr2 + httptest2, and this package make mock testing so easy. Awesome work!
Now to business: The following reprex demonstrates that, although gsub_response() should also modify the request via #8, the file path in httr::req_body_file() is not modified:
The files output by httptest2 then have a part of the tempdir hash in their names, and so are not able to be reproduced, leading to test failures. In other words, a function issuing the req given above fails mock tests because the paths differ each time the test is run. I'd really appreciate any help you could offer. Thanks!
The text was updated successfully, but these errors were encountered:
Whoops, my mistake - I'm also including my own internal hash in the body text, and that is changing between calls. Problem is with me, and not this package. Sorry 'bout that, and keep up the good work!
First off @nealrichardson, thanks so much for this awesome package! I've just started switching all my pkgs over to
httr2
+httptest2
, and this package make mock testing so easy. Awesome work!Now to business: The following reprex demonstrates that, although
gsub_response()
should also modify the request via #8, the file path inhttr::req_body_file()
is not modified:Created on 2022-05-24 by the reprex package (v2.0.1)
The files output by
httptest2
then have a part of the tempdir hash in their names, and so are not able to be reproduced, leading to test failures. In other words, a function issuing thereq
given above fails mock tests because the paths differ each time the test is run. I'd really appreciate any help you could offer. Thanks!The text was updated successfully, but these errors were encountered: