Fix pylint errors and warnings in tests

Change-Id: I03e3f14269353805979ab8a0fcf678400e8eb1c5