vcrpy icon indicating copy to clipboard operation
vcrpy copied to clipboard

disallowing writes only when fully matched request is in cassette

Open miki725 opened this issue 3 years ago • 1 comments

cassette.filter_request only filters some request attributes like headers but does not take into account any of the match_on configurations. As a result if a similar request has been seen before but does not fully match as per match_on, writes will be disallowed. cassette.__contains__ however fully takes into account all match_on matchers and therefore will only guard against recording to the cassette when the same request has been previously recorded

miki725 avatar Sep 27 '22 15:09 miki725

if this looks reasonable I can work on adjusting/adding tests as necessary but would appreciate any feedback first

miki725 avatar Sep 28 '22 10:09 miki725