pytest-vcr icon indicating copy to clipboard operation
pytest-vcr copied to clipboard

add --vcr-mode=refresh pseudo mode

Open mgaitan opened this issue 2 years ago • 2 comments

--vcr-record=all doesn't actually re-record the cassette but keeps or update (if there is a match) any previous episode and append the new ones.(see an example).

That's the reason why we generally recommend to delete the yaml file in advance and recreate it from scratch, but it's tedious. (and this is particularly important if the test match on the request's body)

--vcr-record=refresh delete and start recording from scratch.

mgaitan avatar Mar 11 '22 13:03 mgaitan

@ktosiek may you consider merging this?

mgaitan avatar Mar 31 '22 13:03 mgaitan

@mgaitan As this plugin looks abandoned, may I suggest you try out pytest-recording instead? It has a fully compatible API with this plugin. We have the rewrite record mode, which could be exactly what you're looking for :)

Stranger6667 avatar Jul 21 '22 21:07 Stranger6667