- Add support for binary serializer storage; useful with custom serializers (such as pickle based), however all builtin betamax serializers remain text based.
- Fix bug with
new_episodes
always trying to record. - Imporved documentation.
- This release drops support for Python 3.3; if you are still using Python 3.3 update your Python or don't update to betamax 0.8.2.
- This release is the first release that declares support for Python 3.7, however previous versions most likely worked with 3.7 as well.
- Previous attempts to sanitize cassette names were incomplete. Sanitization has become more thorough which could have some affects on existing cassette files. This may cause new cassettes to be generated.
- Fix bug where there may be an exception raised in a
betamax.exceptions.BetamaxError
repr.
- Add
betamax_parametrized_recorder
andbetamax_parametrized_session
to our list of pytest fixtures so that users will have parametrized cassette names when writing parametrized tests with our fixtures. (I wonder if I can mention parametrization a bunch more times so I can say parametrize a lot in this bullet note.) - Add
ValidationError
and a set of subclasses for each possible validation error. - Raise
InvalidOption
on unknown cassette options rather than silently ignoring extra options. - Raise a subclass of
ValidationError
when a particular cassette option is invalid, rather than silently ignoring the validation failure.
- Fix bug with query string matcher where query-strings without values (e.g.,
?foo&bar
as opposed to?foo=1&bar=2
) were treated as if there were no query string.
- Fix issue #108 by effectively copying the items in the match_requests_on list into the match_options set on a Cassette instance
- Add
before_record
andbefore_playback
hooks - Allow per-cassette placeholders to be merged and override global placeholders
- Fix bug where the
QueryMatcher
failed matching on high Unicode points
- Add
betamax_recorder
pytest fixture - Change default behaviour to allow duplicate interactions to be recorded in single cassette
- Add
allow_playback_repeats
to allow an interaction to be used more than once from a single cassette - Always return a new
Response
object from an Interaction to allow for a streaming response to be usable multiple times - Remove CI support for Pythons 2.6 and 3.2
- Fix bugs with requests 2.8.x integration
- Fix bugs with older versions of requests that were missing an HTTPHeaderDict implementation
Add unittest integration in
betamax.fixtures.unittest
Add pytest integration in
betamax.fixtures.pytest
Add a decorator as a short cut for
use_cassette
Fix bug where body bytes were not always encoded on Python 3.2+
Fixed by @bboe
Fix issue #58 reported by @bboe
Multiple cookies were not being properly stored or replayed after being recorded.
@leighlondon converted
__all__
to a tuple
Fix issue #39 reported by @buttscicles
This bug did not properly parse the Set-Cookie header with multiple cookies when replaying a recorded response.
- Allow the user to pass placeholders to
Betamax#use_cassette
. - Include Betamax's version number in cassettes
- Fix request and response bodies courtesy of @dgouldin
- Fix GitHub Issue #35 - Placeholders were not being properly applied to request bodies. This release fixes that so placeholders are now behave as expected with recorded request bodies.
- Add
Betamax#start
andBetamax#stop
to allow users to start recording and stop without using a context-manager. - Add
digest-auth
matcher to help users match the right request when using requests'HTTPDigestAuth
. - Reorganize and refactor the cassettes, matchers, and serializers modules.
- Refactor some portions of code a bit.
Cassette.cassette_name
no longer is the relative path to the file in which the cassette is saved. To access that information useCassette.cassette_path
. Thecassette_name
attribute is now the name that you pass toBetamax#use_cassette
.
Fix bug where new interactions recorded under
new_episodes
orall
were not actually saved to disk.Match URIs in a far more intelligent way.
Use the Session's original adapters when making new requests
In the event the Session has a custom adapter mounted, e.g., the SSLAdapter in requests-toolbelt, then we should probably use that.
Add
on_init
hook toBaseMatcher
so matcher authors can customize initializationAdd support for custom Serialization formats. See the docs for more info.
Add support for preserving exact body bytes.
Deprecate
serialize
keyword toBetamax#use_cassette
in preference forserialize_with
(to be more similar to VCR).
- Fix how global settings and per-invocation options are persisted and honored. (#10)
- Support
match_requests_on
as a parameter sent toBetamax#use_cassette
. (No issue)
- Make sure what we pass to
base64.b64decode
is a bytes object
- Do not try to sanitize something that may not exist.
- Fix issue when response has a Content-Encoding of gzip and we need to preserve the original bytes of the message.
- Fix issues with how requests parses cookies out of responses
- Fix unicode issues with
Response#text
(trying to useResponse#json
raises exception because it cannot use string decoding on a unicode string)
- Fix issue where there is a unicode character not in
range(128)
- Initial Release
- Support for VCR generated cassettes (JSON only)
- Support for
re_record_interval
- Support for the
once
,all
,new_episodes
,all
cassette modes - Support for filtering sensitive data
- Support for the following methods of request matching:
- Method
- URI
- Host
- Path
- Query String
- Body
- Headers