Fix coverage and pyflakes in haas.testing