Pep8 and replace deprecated test assert stmts.