def test_get_deltas(self):
    flavor = objects.Flavor(memory_mb=100, vcpus=10, swap=0, ephemeral_gb=2, root_gb=5)
    deltas = placement_limits._get_deltas_by_flavor(flavor, False, 2)
    expected = {'servers': 2, 'class:VCPU': 20, 'class:MEMORY_MB': 200, 'class:DISK_GB': 14}
    self.assertDictEqual(expected, deltas)
def test_get_deltas(self):
    flavor = objects.Flavor(memory_mb=100, vcpus=10, swap=0, ephemeral_gb=2, root_gb=5)
    deltas = placement_limits._get_deltas_by_flavor(flavor, False, 2)
    expected = {'servers': 2, 'class:VCPU': 20, 'class:MEMORY_MB': 200, 'class:DISK_GB': 14}
    self.assertDictEqual(expected, deltas)