def test_get_legacy_project_limits(self):
    reglimits = {'servers': 5, 'class:MEMORY_MB': 7}
    projlimits = {uuids.project_id: {'servers': 1}}
    self.useFixture(limit_fixture.LimitFixture(reglimits, projlimits))
    limits = placement_limits.get_legacy_project_limits(uuids.project_id)
    self.assertEqual({'instances': 1, 'cores': 0, 'ram': 7}, limits)
def test_get_legacy_project_limits(self):
    reglimits = {'servers': 5, 'class:MEMORY_MB': 7}
    projlimits = {uuids.project_id: {'servers': 1}}
    self.useFixture(limit_fixture.LimitFixture(reglimits, projlimits))
    limits = placement_limits.get_legacy_project_limits(uuids.project_id)
    self.assertEqual({'instances': 1, 'cores': 0, 'ram': 7}, limits)