def testShutdown(self): ''' Author : LHearen E-mail : [email protected] Time : 2015-12-21 11 : 06 Description : Make sure the shutdown operation can take effect in certain time - 6s; ''' dom = self.__startVM() VM.shutdown(dom.UUIDString()) for i in range(3): sleep(2) if not dom.isActive(): break self.assertFalse(dom.isActive())