summaryrefslogtreecommitdiff
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
commitae01c2c1e5ca693193aed12b66fb78e9d613faa7 (patch)
treeca20c431b84d2a630eed52d8e0d77280b25fec63
parent982c7ab87997e6cfd0e47b283db3c46452a3ab8e (diff)
downloadoslo-context-ae01c2c1e5ca693193aed12b66fb78e9d613faa7.tar.gz
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
-rw-r--r--tests/unit/test_context.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test_context.py b/tests/unit/test_context.py
index e946dc7..3437475 100644
--- a/tests/unit/test_context.py
+++ b/tests/unit/test_context.py
@@ -15,12 +15,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-import unittest
+import testtools
from openstack.common import context
-class ContextTest(unittest.TestCase):
+class ContextTest(testtools.TestCase):
def test_context(self):
ctx = context.RequestContext()