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

Tests with responses #15

Open
hfaran opened this issue Nov 10, 2014 · 2 comments
Open

Tests with responses #15

hfaran opened this issue Nov 10, 2014 · 2 comments

Comments

@hfaran
Copy link
Owner

hfaran commented Nov 10, 2014

Testing against the actual Piazza SaaS is likely more trouble than it's worth; such tests could be set up to tell us when piazza-api breaks against any future changes to the Piazza API, although.

That being said, testing against a static mock API using responses seems like a much better idea for the time being. This won't tell us when Piazza API changes break piazza-api against Piazza, but it will tell us when bad refactoring breaks piazza-api against the mockup.

@michaelmior
Copy link

An easier solution might be using vcrpy. You can just set up a bunch of test cases using requests as you normally would and the responses from the API will be automatically saved and used when tests are rerun in the future.

@hfaran
Copy link
Owner Author

hfaran commented Feb 1, 2015

Thanks for the suggestion! I've heard of vcrpy but never used it; this sounds like a good opportunity to try it out though.

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

2 participants