Ignore oslo.db deprecating sqlalchemy-migrate warning

In I59335b4f318bae2e29ab139cdea089a4d6e14305, oslo.db
is now emitting deprecation warnings for SQLAlchemy-migrate
functions.  This breaks Keystone tests which raise on
DeprecationWarning, so add to the filters.

Change-Id: I42f0abc2ddf8c53239d5098d5f32b667314b942d
This commit is contained in:
Mike Bayer 2020-10-30 20:35:32 -04:00 committed by Kristi Nikolla
parent b0b93c0398
commit 11cfc38df1
1 changed files with 3 additions and 0 deletions

View File

@ -681,6 +681,9 @@ class BaseTestCase(testtools.TestCase):
warnings.filterwarnings('error', category=DeprecationWarning,
module='^keystone\\.')
warnings.filterwarnings(
'ignore', category=DeprecationWarning,
message=r"Using function/method 'db_version\(\)' is deprecated")
warnings.simplefilter('error', exc.SAWarning)
if hasattr(exc, "RemovedIn20Warning"):
warnings.simplefilter('ignore', exc.RemovedIn20Warning)