diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-09-09 18:04:40 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2014-09-27 14:53:12 -0700 |
commit | ce620c399a9e5cf2fd438d0193ba0d83da667a88 (patch) | |
tree | 7c939d1d9f6724109e5b2ec3360a837c405ff6c1 /taskflow/test.py | |
parent | d43cc4f9c33a37d6a3a3f1a1eec7219a0804767b (diff) | |
download | taskflow-ce620c399a9e5cf2fd438d0193ba0d83da667a88.tar.gz |
Use oslotest to provide our base test case class
The oslotest library has a nice openstack testing integrated
base class that can ensure we setup our base test case using
the right logging fixtures, test timeouts, and output fixtures
that better operate in the openstack ecosystem.
This will also allow us to remove some of the functionality
that we currently have in our base test case and replace it with
the equivalent (or better) functionality that oslotest now
provides.
Part of blueprint use-oslo-test
Change-Id: I1602d5180ec8649a1899185972750ddddf65990f
Diffstat (limited to 'taskflow/test.py')
-rw-r--r-- | taskflow/test.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/taskflow/test.py b/taskflow/test.py index 4de61d3..3d94df5 100644 --- a/taskflow/test.py +++ b/taskflow/test.py @@ -15,8 +15,15 @@ # under the License. import fixtures -import mock +from oslotest import base import six +try: + from six.moves import mock +except ImportError: + try: + from unittest import mock + except ImportError: + import mock from testtools import compat from testtools import matchers from testtools import testcase @@ -85,7 +92,7 @@ class ItemsEqual(object): return None -class TestCase(testcase.TestCase): +class TestCase(base.BaseTestCase): """Test case base class for all taskflow unit tests.""" def makeTmpDir(self): @@ -182,7 +189,7 @@ class TestCase(testcase.TestCase): self.assertThat(seq2, matcher) -class MockTestCase(TestCase): +class MockTestCase(base.BaseTestCase): def setUp(self): super(MockTestCase, self).setUp() |