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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user