pep8 changes

still some funny business around environment variables in test run
ALLOWED_HOSTS is not correct during a run_tests run
after this is fixed, tidy the history and I think we're good to go