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

Add unit tests #3

Closed
gfairchild opened this issue Feb 27, 2017 · 3 comments
Closed

Add unit tests #3

gfairchild opened this issue Feb 27, 2017 · 3 comments

Comments

@gfairchild
Copy link
Collaborator

gfairchild commented Feb 27, 2017

I've enabled Travis CI for this project. I need to implement unit tests. This shouldn't be hard (I'll more or less implement examples.py as unit tests), but the main barrier is that I can't actually query the real Yelp API because that would require a client_id and client_secret. I need to look up best practices when unit testing a client-side API implementation.

@gfairchild
Copy link
Collaborator Author

Looks like httmock may be useful here for mocking the behavior of Yelp.

@gfairchild
Copy link
Collaborator Author

Spent a few minutes looking more into this, and I don't think I'll need a mocking library after all. Travis CI contains support for defining sensitive variables as project-specific environment variables, which is exactly what I need. I can simply define my Yelp API credentials as environment variables, which will make unit tests a lot simpler to implement.

@gfairchild
Copy link
Collaborator Author

Closed by #12

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

No branches or pull requests

1 participant