summaryrefslogtreecommitdiffstats
path: root/tests/unit/middleware
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-01-22 19:54:57 -0500
committerMonty Taylor <mordred@inaugust.com>2013-01-24 16:26:43 +1100
commit827547a0b3da411441bf691ddbc94867001a3311 (patch)
tree17fb6b54fa0e00f8fa41d447f865e1ceb25b004a /tests/unit/middleware
parent1bc3ecf25d1b86dcb178d5f59b178bde94f5f667 (diff)
downloadoslo-827547a0b3da411441bf691ddbc94867001a3311.tar.gz
oslo-827547a0b3da411441bf691ddbc94867001a3311.tar.xz
oslo-827547a0b3da411441bf691ddbc94867001a3311.zip
Use testtools as test base class.
On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtools.skipTest Part of blueprint grizzly-testtools. Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
Diffstat (limited to 'tests/unit/middleware')
-rw-r--r--tests/unit/middleware/test_context.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/middleware/test_context.py b/tests/unit/middleware/test_context.py
index 68ae0ad..3d48c23 100644
--- a/tests/unit/middleware/test_context.py
+++ b/tests/unit/middleware/test_context.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import unittest
+import testtools
import mock
@@ -24,7 +24,7 @@ import openstack.common.context
from openstack.common.middleware import context
-class ContextMiddlewareTest(unittest.TestCase):
+class ContextMiddlewareTest(testtools.TestCase):
def test_process_request(self):
req = mock.Mock()
@@ -60,7 +60,7 @@ class ContextMiddlewareTest(unittest.TestCase):
import_class.assert_called_with(mock.sentinel.arg)
-class FilterFactoryTest(unittest.TestCase):
+class FilterFactoryTest(testtools.TestCase):
def test_filter_factory(self):
global_conf = dict(sentinel=mock.sentinel.global_conf)