tests: add test to cover entire template tags.
fix some PEP8 warnings.