fix errorenous logic when running a microsite that could reside in a hosting environment with a marketing site in front of it
pep8/pylint fixes
address PR feedback, remove underscore from test hostname