mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Fixes #123. When attempting to replay the same request twice using record_mode="new_episodes", vcr.py raises UnhandledHTTPRequestError.
This commit is contained in:
@@ -219,6 +219,7 @@ class Cassette(object):
|
||||
|
||||
def __contains__(self, request):
|
||||
"""Return whether or not a request has been stored"""
|
||||
for response in self._responses(request):
|
||||
return True
|
||||
for index, response in self._responses(request):
|
||||
if self.play_counts[index] == 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user