diff options
author | Steve Martinelli <stevemar@ca.ibm.com> | 2015-12-26 04:11:12 -0500 |
---|---|---|
committer | Steve Martinelli <stevemar@ca.ibm.com> | 2015-12-26 04:14:01 -0500 |
commit | 11a4d4d317cf3a0ed16cdb566140c6f593e997f6 (patch) | |
tree | 071552237f8852a7dba99a268feaef3350ddc865 | |
parent | 9290c4d858ef85b211e7ea259848be18cac37e3b (diff) | |
download | keystonemiddleware-11a4d4d317cf3a0ed16cdb566140c6f593e997f6.tar.gz |
ignore deprecation calls in test_audit_middleware
pycadf now issues deprecation warnings on certain events. this
behaviour was causing the the stable/liberty branch to fail, since
we immediately fail any time keystonemiddleware calls a deprecated
function. for the test suite that calls pycadf functions, we should
ignore these errors. Note that this does not happen on the master
branch.
Change-Id: I76cc17b8e4341ee73f343445b3f1b99b64a4977e
Related-Bug: 1504889
-rw-r--r-- | keystonemiddleware/tests/unit/test_audit_middleware.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/keystonemiddleware/tests/unit/test_audit_middleware.py b/keystonemiddleware/tests/unit/test_audit_middleware.py index 48ff9a4..fc761c0 100644 --- a/keystonemiddleware/tests/unit/test_audit_middleware.py +++ b/keystonemiddleware/tests/unit/test_audit_middleware.py @@ -14,6 +14,7 @@ import os import tempfile import uuid +import warnings import mock from oslo_config import cfg @@ -64,6 +65,11 @@ class BaseAuditMiddlewareTest(utils.BaseTestCase): FakeApp(), audit_map_file=self.audit_map, service_name='pycadf') + # NOTE(stevemar): 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\\.') + self.addCleanup(lambda: os.close(self.fd)) self.addCleanup(cfg.CONF.reset) |