summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Cong Tuan <tuanvc@vn.fujitsu.com>2017-11-01 16:48:49 +0700
committerVu Cong Tuan <tuanvc@vn.fujitsu.com>2017-11-01 16:49:10 +0700
commit74638747cef5f25989d52dad8f72673a60caa83c (patch)
treeecfe9fbb8f345451d70d074892948316c37ce239
parentb37a9f96466ec859b7d537e8af31633d732d998c (diff)
downloadoslo-db-74638747cef5f25989d52dad8f72673a60caa83c.tar.gz
Use assertRegex instead of assertRegexpMatches
In Python3, assertRegexpMatches & assertNotRegexpMatches are deprecated in favor of assertRegex and assertNotRegex Change-Id: I35fd27e9618dcc6e229267a9af215ca15a47db69
-rw-r--r--oslo_db/tests/sqlalchemy/test_enginefacade.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/oslo_db/tests/sqlalchemy/test_enginefacade.py b/oslo_db/tests/sqlalchemy/test_enginefacade.py
index 7a7484f..8b782a3 100644
--- a/oslo_db/tests/sqlalchemy/test_enginefacade.py
+++ b/oslo_db/tests/sqlalchemy/test_enginefacade.py
@@ -926,7 +926,7 @@ class MockFacadeTest(oslo_test_base.BaseTestCase):
getattr, context, 'session'
)
- self.assertRegexpMatches(
+ self.assertRegex(
exc.args[0],
"The 'session' context attribute was requested but it has "
"not been established for this context."
@@ -941,7 +941,7 @@ class MockFacadeTest(oslo_test_base.BaseTestCase):
getattr, context, 'connection'
)
- self.assertRegexpMatches(
+ self.assertRegex(
exc.args[0],
"The 'connection' context attribute was requested but it has "
"not been established for this context."
@@ -954,7 +954,7 @@ class MockFacadeTest(oslo_test_base.BaseTestCase):
getattr, context, 'session'
)
- self.assertRegexpMatches(
+ self.assertRegex(
exc.args[0],
"No TransactionContext is established for "
"this .*RequestContext.* object within the current "
@@ -972,7 +972,7 @@ class MockFacadeTest(oslo_test_base.BaseTestCase):
getattr, context, 'connection'
)
- self.assertRegexpMatches(
+ self.assertRegex(
exc.args[0],
"No TransactionContext is established for "
"this .*RequestContext.* object within the current "
@@ -990,7 +990,7 @@ class MockFacadeTest(oslo_test_base.BaseTestCase):
getattr, context, 'transaction'
)
- self.assertRegexpMatches(
+ self.assertRegex(
exc.args[0],
"No TransactionContext is established for "
"this .*RequestContext.* object within the current "
@@ -1008,7 +1008,7 @@ class MockFacadeTest(oslo_test_base.BaseTestCase):
getattr, context, 'transaction_ctx'
)
- self.assertRegexpMatches(
+ self.assertRegex(
exc.args[0],
"No TransactionContext is established for "
"this .*RequestContext.* object within the current "