A repo to flex your testing skills. It's intentionally broken, let's see if you can fix it.
pip install virtualenv mkdir env virtualenv env source env/bin/activate pip install -r requirements.txt
Just run nosetests
in your terminal where this code lives with
the virtualenv activated
Note: If you want to see what happens when the integration tests are run without cassette, just move the responses file out of the way (aka delete it)
- Figure out how to fix the test suite.
- Figure out how to make a decorator out of the argument checking and response formatting in the views file so we can be DRY.
If you want to run one of the apps do the following:
- Make sure you have your virtualenv activated.
- Be in the
prove-it
directory. - python -m calc.views (to get the calc app running)
- python -m calc.otherapp (if you want to see the app that is "integrating")
- I'm not entirely sure you can expect request params to be ordered in any way, but I think it's ok for this example.
- You should realistically have all your view tests be full unit tests and mock out the calculator module, but this is a learning moment, so some of them aren't.