Update tests.py

Full set of tests, 100% coverage on all but views.py