Move many test helpers to a common helper file
tests: code style
Tests: code style, run pep8 on tests