Merge "Replace direct use of testtools BaseTestCase."
This commit is contained in:
commit
d93e3baa02
|
@ -21,17 +21,16 @@ import select
|
|||
import shutil
|
||||
import tempfile
|
||||
import time
|
||||
import testtools
|
||||
|
||||
import eventlet
|
||||
from eventlet import greenpool
|
||||
from eventlet import greenthread
|
||||
|
||||
from openstack.common import lockutils
|
||||
from tests import utils as test_utils
|
||||
from tests import utils
|
||||
|
||||
|
||||
class TestFileLocks(test_utils.BaseTestCase):
|
||||
class TestFileLocks(utils.BaseTestCase):
|
||||
def test_concurrent_green_lock_succeeds(self):
|
||||
"""Verify spawn_n greenthreads with two locks run concurrently."""
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
|
@ -66,7 +65,7 @@ class TestFileLocks(test_utils.BaseTestCase):
|
|||
shutil.rmtree(tmpdir)
|
||||
|
||||
|
||||
class LockTestCase(test_utils.BaseTestCase):
|
||||
class LockTestCase(utils.BaseTestCase):
|
||||
def test_synchronized_wrapped_function_metadata(self):
|
||||
@lockutils.synchronized('whatever', 'test-')
|
||||
def foo():
|
||||
|
|
|
@ -15,14 +15,13 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import testtools
|
||||
|
||||
import mock
|
||||
|
||||
from openstack.common import processutils
|
||||
from tests import utils
|
||||
|
||||
|
||||
class UtilsTest(testtools.TestCase):
|
||||
class UtilsTest(utils.BaseTestCase):
|
||||
# NOTE(jkoelker) Moar tests from nova need to be ported. But they
|
||||
# need to be mock'd out. Currently they requre actually
|
||||
# running code.
|
||||
|
@ -32,7 +31,7 @@ class UtilsTest(testtools.TestCase):
|
|||
hozer=True)
|
||||
|
||||
|
||||
class ProcessExecutionErrorTest(testtools.TestCase):
|
||||
class ProcessExecutionErrorTest(utils.BaseTestCase):
|
||||
|
||||
def test_defaults(self):
|
||||
err = processutils.ProcessExecutionError()
|
||||
|
|
Loading…
Reference in New Issue