Get rid of thin wrapper of LimitFixture
... to leverage the common implementation and reduce amount of logic maintained specifically in this repository. Change-Id: I3f8197ff90d36f933a5b0580be533176c3357e3e Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -19,7 +19,6 @@ import warnings
|
||||
|
||||
import fixtures as pyfixtures
|
||||
from oslo_db import warning as oslo_db_warning
|
||||
from oslo_limit import fixture as ol_fixture
|
||||
from sqlalchemy import exc as sqla_exc
|
||||
|
||||
_TRUE_VALUES = ('True', 'true', '1', 'yes')
|
||||
@@ -186,8 +185,3 @@ class WarningsFixture(pyfixtures.Fixture):
|
||||
|
||||
def _reset_warning_filters(self):
|
||||
warnings.filters[:] = self._original_warning_filters
|
||||
|
||||
|
||||
class KeystoneQuotaFixture(ol_fixture.LimitFixture):
|
||||
def __init__(self, **defaults):
|
||||
super(KeystoneQuotaFixture, self).__init__(defaults, {})
|
||||
|
@@ -20,13 +20,13 @@ from unittest.mock import patch
|
||||
import uuid
|
||||
|
||||
from oslo_limit import exception as ol_exc
|
||||
from oslo_limit import fixture as ol_fixture
|
||||
from oslo_utils import units
|
||||
|
||||
from glance.common import exception
|
||||
from glance.common import store_utils
|
||||
import glance.quota
|
||||
from glance.quota import keystone as ks_quota
|
||||
from glance.tests.unit import fixtures as glance_fixtures
|
||||
from glance.tests.unit import utils as unit_test_utils
|
||||
from glance.tests import utils as test_utils
|
||||
|
||||
@@ -760,11 +760,11 @@ class TestImageKeystoneQuota(test_utils.BaseTestCase):
|
||||
def setUp(self):
|
||||
super(TestImageKeystoneQuota, self).setUp()
|
||||
|
||||
default_limits = {
|
||||
reglimits = {
|
||||
ks_quota.QUOTA_IMAGE_SIZE_TOTAL: 500,
|
||||
'another_limit': 2,
|
||||
}
|
||||
ksqf = glance_fixtures.KeystoneQuotaFixture(**default_limits)
|
||||
ksqf = ol_fixture.LimitFixture(reglimits, {})
|
||||
|
||||
self.useFixture(ksqf)
|
||||
|
||||
|
Reference in New Issue
Block a user