In this step, you will add system tests to catinabox.
- Look at the existing system tests:
christie@paw-paw:~/catinabox$ ls tests/system
We have one test file:
- Run the existing system tests:
py.test tests/system
-
Take a look at the supporting test code in conftest.py.
The filename
conftest.py
instructspy.test
to look in this file for fixture classes.Notice also the class
HttpBaseClient
, a wrapper aroundrequests
which makes calling methods on the service in tests a bit less verbose. -
Add more system tests to
test_cattery.py
until you feel the coverage is adequate. Remember that you don't need to test every path. -
When you are done, commit your changes and push to your pull request:
christie@paw-paw:~$ git commit -a
christie@paw-paw:~$ git push origin master
You should see the CI builds succeed.
- If you get stuck, take a peek at [the solution](TODO: git tag).