Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing with http_fake #22

Open
jaaqo opened this issue Feb 2, 2018 · 0 comments
Open

Testing with http_fake #22

jaaqo opened this issue Feb 2, 2018 · 0 comments

Comments

@jaaqo
Copy link

jaaqo commented Feb 2, 2018

Hey,

I'm not sure if the http_fake is designed to be used outside this project, but it looked like an easy way to mock for a python novice like me.

https://github.com/Shopify/pyactiveresource/blob/master/pyactiveresource/testing/http_fake.py#L21

This opener install expression seems to bleed outside the test and caused my functional tests' urllib go haywire.

I extended the test class in the Shopify python api to have reset the urllib opener at tearDown. That seemed to fix it. Is there a better way to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant