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

click cli testing #77

Merged
merged 4 commits into from
Aug 19, 2020
Merged

click cli testing #77

merged 4 commits into from
Aug 19, 2020

Conversation

jSadoski
Copy link
Contributor

@jSadoski jSadoski commented Aug 5, 2020

Context

closes #41

Description

This adds a test suite using click.testing for cli tests. It also adds a feature to allow pytest to use an --auth option in the same way it's used with starcli. This allows the tests to run much faster and test the functionality of click with valid API credentials.

I'm sure these tests could be improved; I hope this serves as a starting point to write better tests.

Known issue: Right now, tests/test_search is not using authentication, and if all the tests are run at once, the rate limit causes those tests to fail. tests/test_search still works if you run the file independently (python -m pytest tests/test_search.py). It should be easy to fix soon.

@jSadoski
Copy link
Contributor Author

jSadoski commented Aug 5, 2020

Looks like I'll have to work on test_search.py now!

@hedyhli hedyhli merged commit bef2097 into hedyhli:main Aug 19, 2020
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

Successfully merging this pull request may close these issues.

Add CLI tests (pytest) to test the CLI itself
2 participants