PEP8 fixes to test code