diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index 92a5a01..bad8a83 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -236,12 +236,16 @@ class VCRConnection(object): self._vcr_request ) ) - self.real_connection.request( - method=self._vcr_request.method, - url=self._url(self._vcr_request.uri), - body=self._vcr_request.body, - headers=self._vcr_request.headers, - ) + # This is imported here to avoid circular import. + # TODO(@IvanMalison): Refactor to allow normal import. + from vcr.patch import force_reset + with force_reset(): + self.real_connection.request( + method=self._vcr_request.method, + url=self._url(self._vcr_request.uri), + body=self._vcr_request.body, + headers=self._vcr_request.headers, + ) # get the response response = self.real_connection.getresponse()