add testing infrastructure; add tests for settings.py

Setting up the test environment/running the tests is a bit inconvenient. We'll have to improve that.