Replace use of testtools.testcase.TestSkipped
This has been deprecated for removal [1]. Use the stdlib variant instead. [1] https://github.com/testing-cabal/testtools/commit/59b890db3c Change-Id: Iab4a5b050f9960b1e125aa9dd657cc690f06d32f Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
c65282fcb0
commit
af0a60b256
@ -16,6 +16,7 @@
|
||||
|
||||
import functools
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import fixtures
|
||||
from oslo_utils import uuidutils
|
||||
@ -34,7 +35,7 @@ def _skip_decorator(func):
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except tooz.NotImplemented as e:
|
||||
raise testcase.TestSkipped(str(e))
|
||||
raise unittest.SkipTest(str(e))
|
||||
return skip_if_not_implemented
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
from unittest import mock
|
||||
import urllib
|
||||
|
||||
@ -304,15 +305,16 @@ class TestAPI(tests.TestWithCoordinator):
|
||||
|
||||
def test_heartbeat(self):
|
||||
if not self._coord.requires_beating:
|
||||
raise testcase.TestSkipped("Test not applicable (heartbeating"
|
||||
" not required)")
|
||||
raise unittest.SkipTest(
|
||||
"Test not applicable (heartbeating not required)"
|
||||
)
|
||||
self._coord.heartbeat()
|
||||
|
||||
def test_heartbeat_loop(self):
|
||||
if not self._coord.requires_beating:
|
||||
raise testcase.TestSkipped("Test not applicable (heartbeating"
|
||||
" not required)")
|
||||
|
||||
raise unittest.SkipTest(
|
||||
"Test not applicable (heartbeating not required)"
|
||||
)
|
||||
heart = self._coord.heart
|
||||
self.assertFalse(heart.is_alive())
|
||||
heart.start()
|
||||
|
Loading…
Reference in New Issue
Block a user