def setUp(self):
    super(TestEnforce, self).setUp()
    self.context = context.RequestContext()
    self.flags(driver=limit_utils.UNIFIED_LIMITS_DRIVER, group='quota')
    placement_limits._ENFORCER = mock.Mock(limit.Enforcer)
    self.flavor = objects.Flavor(memory_mb=100, vcpus=10, swap=0, ephemeral_gb=2, root_gb=5)
def setUp(self):
    super(TestEnforce, self).setUp()
    self.context = context.RequestContext()
    self.flags(driver=limit_utils.UNIFIED_LIMITS_DRIVER, group='quota')
    placement_limits._ENFORCER = mock.Mock(limit.Enforcer)
    self.flavor = objects.Flavor(memory_mb=100, vcpus=10, swap=0, ephemeral_gb=2, root_gb=5)