def testTroopColorSpriteMethodCallsSurfaceFillMethod(self): unit = Troop() unit.createImage() unit.image = Mock() unit.colorSprite((0,0,0)) unit.image.fill.assert_called_once_with((0,0,0))
def testTroopGetImageForManuallyAssignedImageReturnsCorrectImage(self): unit = Troop() image = pygame.Surface((10,10)) unit.image = image self.assertEqual(unit.getImage(), unit.image)