1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 17:15:35 +00:00

Feat/2.1.0 release changelog documentation (#466)

* chore(changelog): add changelog for 2.1.0 release

* doc(rewind): add documentation a new feature `rewind` that can replay a cassette

* doc(exception): add documentation on the new behavior of the CannotOverwriteExistingCassetteException message
This commit is contained in:
Arthur Hamon
2019-08-08 08:37:55 +02:00
committed by Josh Peak
parent cc752cf790
commit 1b565d3f88
3 changed files with 50 additions and 1 deletions

View File

@@ -372,3 +372,16 @@ cassette names, use ``VCR.ensure_suffix`` as follows:
@my_vcr.use_cassette
def my_test_function():
Rewind Cassette
---------------
VCR.py allows to rewind a cassette in order to replay it inside the same function/test.
.. code:: python
with vcr.use_cassette('fixtures/vcr_cassettes/synopsis.yaml') as cass:
response = urllib2.urlopen('http://www.zombo.com/').read()
assert cass.all_played
a.rewind()
assert not cass.all_played