vcrpy
vcrpy copied to clipboard
urllib compatibility
urllib (though deprecated) uses all kinds of weird httplib compat classes that aren't stubbed properly by vcr. I would like to support this someday.
I wonder if it would also solve the problem I encountered with newer version of google cloud sdk, where my tests fail with:
…
self = <fancy_urllib.PresetProxyHTTPSConnection object at 0x7fda42beb0d0>
def connect(self):
> httplib.HTTPConnection.connect(self)
E TypeError: unbound method connect() must be called with VCRHTTPConnectionapplications/foundit/tests_unit/cassettes/successfull_payment_cus-gae.yaml instance as first argument (got PresetProxyHTTPSConnection instance instead)
/opt/google-cloud-sdk/platform/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py:190: TypeError
I'd like to help solving this problem, but some hints about where I should look and what should probably be done would be a great help.
👋 Hi there! I'm a late comer to this issue 😄
@matclab, were you able to fix your Google App Engine + vcrpy issue? @kevin1024, is this still an open enhancement?
Thanks! I was pumped to find this library (big fan of the VCR flow), but I'm up against a similar urllib issue.
@andrewsardone Unfortunately not. Using web2py I can do most of my unit test outside of GAE, and I've setup a continuous integration service to do the real online test (wityhout vcrpy) on GAE before shipping…
Gotcha. Thanks for the reply, @matclab!
@kevin1024
I'm also interested to use vcrpy for testing imdbpy. It uses urllib. Is it difficult to add support for this lib?
A lot of changes have happened to VCRpy since this ticket was opened. As this ticket has become stale, would you mind closing it if it is no longer needed / relevant?
If I haven't heard anything in a week I'll mark it as closed as we have a lot of old tickets that need to be groomed to make it easier to see what is still relevant.
However if it is still needed, please feel free to re-open or create a new ticket.
Thanks! 🙏