

def test_add_console(self):
    instance = self._create_instance()
    self.console.add_console(self.context, instance['id'])
    instance = db.instance_get(self.context, instance['id'])
    pool = db.console_pool_get_by_host_type(self.context, instance['host'], self.console.host, self.console.driver.console_type)
    console_instances = [con['instance_uuid'] for con in pool['consoles']]
    self.assertIn(instance['uuid'], console_instances)
    db.instance_destroy(instance.context, instance['uuid'])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/console/test_console.py ConsoleTestCase.test_add_console/VarMisuse@112/146 `self`->`instance`