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

Fix API by adding 'responses_of' method

`responses_of` replaces `response_of`, since each request can have
several matching responses now.

This breaks backwards compatibility if you are using the
response_of method, so a version bump will be required.
This commit is contained in:
Kevin McCarthy
2013-12-01 14:26:35 -10:00
parent b84f8e963b
commit 188b57a2fa
4 changed files with 29 additions and 8 deletions

View File

@@ -166,7 +166,7 @@ class VCRConnectionMixin:
# Check to see if the cassette has a response for this request. If so,
# then return it
if self._vcr_request in self.cassette and self.cassette.record_mode != "all" and self.cassette.rewound:
response = self.cassette.response_of(self._vcr_request)
response = self.cassette.play_response(self._vcr_request)
return VCRHTTPResponse(response)
else:
if self.cassette.write_protected: