def test_get_deltas_check_baremetal(self):
    extra_specs = {'resources:VCPU': 0, 'resources:MEMORY_MB': 0, 'resources:DISK_GB': 0, 'resources:CUSTOM_BAREMETAL': 1}
    flavor = objects.Flavor(memory_mb=100, vcpus=10, swap=0, ephemeral_gb=2, root_gb=5, extra_specs=extra_specs)
    deltas = placement_limits._get_deltas_by_flavor(flavor, True, 1)
    expected = {'servers': 1, 'class:CUSTOM_BAREMETAL': 1}
    self.assertDictEqual(expected, deltas)
def test_get_deltas_check_baremetal(self):
    extra_specs = {'resources:VCPU': 0, 'resources:MEMORY_MB': 0, 'resources:DISK_GB': 0, 'resources:CUSTOM_BAREMETAL': 1}
    flavor = objects.Flavor(memory_mb=100, vcpus=10, swap=0, ephemeral_gb=2, root_gb=5, extra_specs=extra_specs)
    deltas = placement_limits._get_deltas_by_flavor(flavor, True, 1)
    expected = {'servers': 1, 'class:CUSTOM_BAREMETAL': 1}
    self.assertDictEqual(expected, deltas)