

def test_cost_fn_weights(self):
    self.flags(least_cost_scheduler_cost_functions=['nova.scheduler.least_cost.noop_cost_fn'], noop_cost_fn_weight=2)
    num = 1
    request_spec = {
        
    }
    hosts = self.sched.filter_hosts(num, request_spec)
    expected = [dict(weight=2, hostname=hostname) for (hostname, caps) in hosts]
    self.assertWeights(expected, num, request_spec, hosts)

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/scheduler/test_least_cost_scheduler.py LeastCostSchedulerTestCase.test_cost_fn_weights/original