From b218b29c383d13dfe662ce72fe82f288c69d4048 Mon Sep 17 00:00:00 2001 From: "wu.shiming" Date: Mon, 8 Nov 2021 14:34:35 +0800 Subject: [PATCH] Replace deprecated assertRaisesRegexp The assertRaisesRegexp method has been deprecated since it was renamed to assertRaisesRegex in Python 3.2. https://docs.python.org/3/library/unittest.html#deprecated-aliases Change-Id: I38ed4bebee3617267463d13d8f12bc083ab74ac2 --- kolla_ansible/tests/unit/test_nova_filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kolla_ansible/tests/unit/test_nova_filters.py b/kolla_ansible/tests/unit/test_nova_filters.py index 128ee67c57..e8d5c507aa 100644 --- a/kolla_ansible/tests/unit/test_nova_filters.py +++ b/kolla_ansible/tests/unit/test_nova_filters.py @@ -70,8 +70,8 @@ class TestFilters(unittest.TestCase): def test_extract_duplicate_cell(self): test_data = os.path.join(os.path.dirname( __file__), 'data', 'nova_manage_cli_output_duplicate_cells') - self.assertRaisesRegexp(jinja2.TemplateRuntimeError, 'duplicates', - self._test_extract_cell, test_data, 'cell0001') + self.assertRaisesRegex(jinja2.TemplateRuntimeError, 'duplicates', + self._test_extract_cell, test_data, 'cell0001') def test_namespace_haproxy_for_cell_with_empty_name(self): example_services = {