Fix pylint errors in tests