

def test_get_pool_creates_new_pool_if_needed(self):
    self.assertRaises(exception.NotFound, db.console_pool_get_by_host_type, self.context, pool.host, self.console.host, self.console.driver.console_type)
    pool = self.console._get_pool_for_instance_host(self.context, self.host)
    pool2 = db.console_pool_get_by_host_type(self.context, self.host, self.console.host, self.console.driver.console_type)
    self.assertEqual(pool['id'], pool2['id'])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/console/test_console.py ConsoleTestCase.test_get_pool_creates_new_pool_if_needed/VarMisuse@26/42 `self`->`pool`