Refactor unit tests

* Split test_unit.py into separate test modules.
* Add `test_unit` command to manage.py because I got tired of running the functional tests every time.