diff --git a/magnumclient/tests/v1/test_baymodels.py b/magnumclient/tests/v1/test_baymodels.py index c8d41da9..22ed71db 100644 --- a/magnumclient/tests/v1/test_baymodels.py +++ b/magnumclient/tests/v1/test_baymodels.py @@ -328,10 +328,10 @@ class BayModelManagerTest(testtools.TestCase): def test_baymodel_create_fail(self): CREATE_BAYMODEL_FAIL = copy.deepcopy(CREATE_BAYMODEL) CREATE_BAYMODEL_FAIL["wrong_key"] = "wrong" - self.assertRaisesRegexp(exceptions.InvalidAttribute, - ("Key must be in %s" % - ','.join(baymodels.CREATION_ATTRIBUTES)), - self.mgr.create, **CREATE_BAYMODEL_FAIL) + self.assertRaisesRegex(exceptions.InvalidAttribute, + ("Key must be in %s" % + ','.join(baymodels.CREATION_ATTRIBUTES)), + self.mgr.create, **CREATE_BAYMODEL_FAIL) self.assertEqual([], self.api.calls) def test_baymodel_delete_by_id(self): diff --git a/magnumclient/tests/v1/test_bays.py b/magnumclient/tests/v1/test_bays.py index f8c2b66a..47d0af7c 100644 --- a/magnumclient/tests/v1/test_bays.py +++ b/magnumclient/tests/v1/test_bays.py @@ -272,10 +272,10 @@ class BayManagerTest(testtools.TestCase): def test_bay_create_fail(self): CREATE_BAY_FAIL = copy.deepcopy(CREATE_BAY) CREATE_BAY_FAIL["wrong_key"] = "wrong" - self.assertRaisesRegexp(exceptions.InvalidAttribute, - ("Key must be in %s" % - ','.join(bays.CREATION_ATTRIBUTES)), - self.mgr.create, **CREATE_BAY_FAIL) + self.assertRaisesRegex(exceptions.InvalidAttribute, + ("Key must be in %s" % + ','.join(bays.CREATION_ATTRIBUTES)), + self.mgr.create, **CREATE_BAY_FAIL) self.assertEqual([], self.api.calls) def test_bay_delete_by_id(self): diff --git a/magnumclient/tests/v1/test_certificates.py b/magnumclient/tests/v1/test_certificates.py index dabb6e70..ce458316 100644 --- a/magnumclient/tests/v1/test_certificates.py +++ b/magnumclient/tests/v1/test_certificates.py @@ -101,10 +101,10 @@ class CertificateManagerTest(testtools.TestCase): def test_create_fail(self): create_cert_fail = copy.deepcopy(CREATE_CERT) create_cert_fail["wrong_key"] = "wrong" - self.assertRaisesRegexp(exceptions.InvalidAttribute, - ("Key must be in %s" % - ','.join(certificates.CREATION_ATTRIBUTES)), - self.mgr.create, **create_cert_fail) + self.assertRaisesRegex(exceptions.InvalidAttribute, + ("Key must be in %s" % + ','.join(certificates.CREATION_ATTRIBUTES)), + self.mgr.create, **create_cert_fail) self.assertEqual([], self.api.calls) def test_rotate_ca(self): diff --git a/magnumclient/tests/v1/test_clusters.py b/magnumclient/tests/v1/test_clusters.py index 793cb887..5ab03294 100644 --- a/magnumclient/tests/v1/test_clusters.py +++ b/magnumclient/tests/v1/test_clusters.py @@ -288,10 +288,10 @@ class ClusterManagerTest(testtools.TestCase): def test_cluster_create_fail(self): CREATE_CLUSTER_FAIL = copy.deepcopy(CREATE_CLUSTER) CREATE_CLUSTER_FAIL["wrong_key"] = "wrong" - self.assertRaisesRegexp(exceptions.InvalidAttribute, - ("Key must be in %s" % - ','.join(clusters.CREATION_ATTRIBUTES)), - self.mgr.create, **CREATE_CLUSTER_FAIL) + self.assertRaisesRegex(exceptions.InvalidAttribute, + ("Key must be in %s" % + ','.join(clusters.CREATION_ATTRIBUTES)), + self.mgr.create, **CREATE_CLUSTER_FAIL) self.assertEqual([], self.api.calls) def test_cluster_delete_by_id(self): diff --git a/magnumclient/tests/v1/test_clustertemplates.py b/magnumclient/tests/v1/test_clustertemplates.py index aa88f1ba..548f6b52 100644 --- a/magnumclient/tests/v1/test_clustertemplates.py +++ b/magnumclient/tests/v1/test_clustertemplates.py @@ -388,7 +388,7 @@ class ClusterTemplateManagerTest(testtools.TestCase): def test_clustertemplate_create_fail(self): CREATE_CLUSTERTEMPLATE_FAIL = copy.deepcopy(CREATE_CLUSTERTEMPLATE) CREATE_CLUSTERTEMPLATE_FAIL["wrong_key"] = "wrong" - self.assertRaisesRegexp( + self.assertRaisesRegex( exceptions.InvalidAttribute, ("Key must be in %s" % ','.join(cluster_templates.CREATION_ATTRIBUTES)),