Disble deprecation warning check when loading auth plugins

Change is applicable to stable/liberty branch only.

Change-Id: I6f54d1fa10333935dcbca0ceb0474b643359bdd5
This commit is contained in:
guang-yee 2016-02-22 15:58:48 -08:00
parent 9167afaafc
commit 182f4461f2
2 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import stat
import tempfile
import time
import uuid
import warnings
import fixtures
from keystoneclient import auth
@ -313,6 +314,11 @@ class BaseAuthTokenMiddlewareTest(base.BaseAuthTokenTestCase):
self.response_status = None
self.response_headers = None
# NOTE(gyee): For this test suite and for the stable liberty branch
# only, we will ignore deprecated calls that keystonemiddleware makes.
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='^keystonemiddleware\\.')
def call_middleware(self, **kwargs):
return self.call(self.middleware, **kwargs)

View File

@ -11,6 +11,7 @@
# under the License.
import uuid
import warnings
from keystoneclient import auth
from keystoneclient import fixture
@ -29,6 +30,11 @@ class BaseUserPluginTests(object):
auth_plugin,
group='keystone_authtoken',
**kwargs):
# NOTE(gyee): For this test suite and for the stable liberty branch
# only, we will ignore deprecated calls that keystonemiddleware makes.
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='^keystonemiddleware\\.')
opts = auth.get_plugin_class(auth_plugin).get_options()
self.cfg.register_opts(opts, group=group)