]> khamidou — GitHub mirrors - vcrpy.git/commit
fixes before_record_response mutates response
authorkg <kyle@easypost.com>
Wed, 9 May 2018 20:44:28 +0000 (20:44 +0000)
committerkg <kyle@easypost.com>
Thu, 24 May 2018 01:12:13 +0000 (01:12 +0000)
commitba79174a1faef3e6b476672c6b9b169c15868d6b
tree039747613f5111e27c2f58b4687ee257a628febb
parentf890709a20566287ef0c3d3b22d412c1186fcc11
fixes before_record_response mutates response

When no cassette exists, it's expected that the response returned, should be
the original, unchanged response. The response recorded in the cassette should be
that which is returned by the before_record_response callback.

But on subsequent requests/responses (when a cassette exists), the responses
returned should be exactly what is in the cassette.

resolves #355
tests/integration/test_stubs.py
vcr/cassette.py