diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-01-22 19:54:57 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-01-24 16:26:43 +1100 |
commit | 827547a0b3da411441bf691ddbc94867001a3311 (patch) | |
tree | 17fb6b54fa0e00f8fa41d447f865e1ceb25b004a /tests/unit/rpc/test_matchmaker.py | |
parent | 1bc3ecf25d1b86dcb178d5f59b178bde94f5f667 (diff) | |
download | oslo-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/rpc/test_matchmaker.py')
-rw-r--r-- | tests/unit/rpc/test_matchmaker.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/rpc/test_matchmaker.py b/tests/unit/rpc/test_matchmaker.py index 8a48608..ddfb776 100644 --- a/tests/unit/rpc/test_matchmaker.py +++ b/tests/unit/rpc/test_matchmaker.py @@ -15,7 +15,7 @@ # under the License. import logging -import unittest +import testtools from openstack.common.rpc import matchmaker @@ -23,7 +23,7 @@ from openstack.common.rpc import matchmaker LOG = logging.getLogger(__name__) -class _MatchMakerTestCase(unittest.TestCase): +class _MatchMakerTestCase(testtools.TestCase): def test_valid_host_matches(self): queues = self.driver.queues(self.topic) matched_hosts = map(lambda x: x[1], queues) |