Skip to content

Add before_record_response callback to use_cassette; Various bugfixes

Compare
Choose a tag to compare
@colonelpanic8 colonelpanic8 released this 21 Sep 12:22
· 932 commits to master since this release
  • Move context management of use_cassette into CassetteContextDecorator so that a separate cassette is created for each invocation of a use_cassette decorated function.
  • VCR now passes a callable to CassetteContextDecorator (instead of passing the arguments for cassette creation) so that changes to the VCRs default configuration can propagate to functions that have already been decorated.
  • Add mock and contextlib2 as dependencies.
  • Do all patching through mock.patch. This made it so that CassetteContextDecorators actually stack properly.
  • Remove enter and exit from Cassette class.
  • Add before_record_response hook to Cassette and VCR classes. This is mainly for the purpose of scrubbing responses.
  • Version bump (1.0.3 -> 1.1.0).
  • Remove contextdecorator dependency.