This works great for every other request method (works for GET, POST, PATCH, PUT), but those headers are not removed before the delete request .yaml is saved.
Note that headers are removed by two methods:
1) 'filter_headers' is passed to vcr to remove "Cookie"
2) the 'set-cookie' header is replaced with 'safetoken' in before_record_response
Interestingly, neither of these methods works for the delete request.
It's possible that I've done something wrong, but I've overridden the
vcr
config inconftest.py
as below:Where
scrub_header
replaces headers as such:This works great for every other request method (works for GET, POST, PATCH, PUT), but those headers are not removed before the delete request .yaml is saved.
Note that headers are removed by two methods: 1) 'filter_headers' is passed to
vcr
to remove "Cookie" 2) the 'set-cookie' header is replaced with 'safetoken' inbefore_record_response
Interestingly, neither of these methods works for the delete request.Thoughts?