mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +00:00
This test will fail with the following error: TypeError: unbound method __init__() must be called with VCRHTTPConnection instance as first argument (got CertValidatingHTTPSConnection instance instead) The TypeError is raised because the __init__ method of Boto's CertValidatingHTTPSConnection (which extends httplib.HTTPConnection) calls httplib.HTTPConnection.__init__, and during the test httplib.HTTPConnection actually refers to the patched verison (i.e., VCRHTTPConnection). When VCRHTTPConnection.__init__ is called, it expects to receive a VCRHTTPConnection object as its first argument, but instead it receives a CertValidatingHTTPSConnection object. Because the only ancestor class of CertValidatingHTTPSConnection is the original, un-patched httplib.HTTPConnection, the first argument is not considered to be a VCRHTTPConnection object, so a TypeError is raised.