Add pyflakes and update test to conform