Merge "Remove usage of TestCase.skip() method"

This commit is contained in:
Zuul 2018-03-26 20:28:36 +00:00 committed by Gerrit Code Review
commit 5b54defd52
3 changed files with 4 additions and 4 deletions

View File

@ -236,8 +236,8 @@ def skip_if_ovs_older_than(ovs_version):
current_ovs_version = version.StrictVersion(
ovs.config['ovs_version'])
if current_ovs_version < version.StrictVersion(ovs_version):
test.skip("This test requires OVS version %s or higher." %
ovs_version)
test.skipTest("This test requires OVS version %s or higher." %
ovs_version)
return f(test)
return check_ovs_and_skip
return skip_if_bad_ovs

View File

@ -107,7 +107,7 @@ class TestDhcpAgentNoHA(BaseDhcpAgentTest):
# testing matters.
# TODO(jlibosva) revisit when ip_lib supports nested namespaces
if self.environment.hosts[0].dhcp_agent.namespace is not None:
self.skip("ip_lib doesn't support nested namespaces")
self.skipTest("ip_lib doesn't support nested namespaces")
self.vm.block_until_dhcp_config_done()

View File

@ -323,7 +323,7 @@ class OpportunisticDBTestMixin(object):
if not hasattr(self, 'db'):
msg = "backend '%s' unavailable" % self.DRIVER
if self.SKIP_ON_UNAVAILABLE_DB:
self.skip(msg)
self.skipTest(msg)
else:
self.fail(msg)