diff --git a/tests/unit/test_cassettes.py b/tests/unit/test_cassettes.py index d4ba511..f692ba5 100644 --- a/tests/unit/test_cassettes.py +++ b/tests/unit/test_cassettes.py @@ -44,12 +44,12 @@ def test_cassette_contains(): a.append('foo','bar') assert 'foo' in a -def test_cassette_response(): +def test_cassette_response_of(): a = Cassette('test') a.append('foo','bar') - assert a.response('foo') == 'bar' + assert a.response_of('foo') == 'bar' -def test_cassette_missing_response(): +def test_cassette_get_missing_response(): a = Cassette('test') with pytest.raises(KeyError): - a.response('foo') + a.response_of('foo') diff --git a/vcr/cassette.py b/vcr/cassette.py index 5b158d6..11f6f03 100644 --- a/vcr/cassette.py +++ b/vcr/cassette.py @@ -52,7 +52,7 @@ class Cassette(object): '''Add a pair of request, response to this cassette''' self.data[request] = response - def response(self, request): + def response_of(self, request): '''Find the response corresponding to a request''' return self.data[request] diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index bea9546..eba447b 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -69,7 +69,7 @@ class VCRConnectionMixin: # Check to see if the cassette has a response for this request. If so, # then return it if self._request in self.cassette: - response = self.cassette.response(self._request) + response = self.cassette.response_of(self._request) # Alert the cassette to the fact that we've served another # response for the provided requests self.cassette.mark_played(self._request)