Fix pylint warnings in tests