def test_dm_instance(self):
     FakeDeviceConnect.reset()
     FakeJobHandler.reset()
     kill_device_manager(TestInfraDM._dm_greenlet)
     self.check_dm_instance()
     TestInfraDM._dm_greenlet = gevent.spawn(launch_device_manager,
         self._cluster_id, TestInfraDM._api_server_ip, TestInfraDM._api_server_port)
     wait_for_device_manager_up()
 def tearDownClass(cls):
     test_common.kill_device_manager(cls._dm_greenlet)
     test_common.kill_schema_transformer(cls._st_greenlet)
     super(DMTestCase, cls).tearDownClass()