def test_kill(self): test_object = MockGameObject() self.patch_object(test_object, 'on_kill') self.patch_object(test_object, 'clear_layers') test_object.kill() self.assertEqual(1, test_object.clear_layers.call_count) self.assertEqual(1, test_object.on_kill.call_count)
def test_enable(self): test_object = MockGameObject(is_enabled=False) self.assertFalse(test_object.is_enabled) test_object.enable() self.assertTrue(test_object.is_enabled)