diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-01-22 19:54:57 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-01-22 19:54:57 -0500 |
commit | bce3d83daf9e188a3e690872c12f96bb08326d76 (patch) | |
tree | 25dc3964ecad8a73ec8fa6cd32ea77c265e2a316 | |
parent | 6c0493d95d472675bc42ff5c8c75153fadb6144a (diff) | |
download | oslo-serialization-bce3d83daf9e188a3e690872c12f96bb08326d76.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_jsonutils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/test_jsonutils.py b/tests/unit/test_jsonutils.py index cc8d26a..eebbfb8 100644 --- a/tests/unit/test_jsonutils.py +++ b/tests/unit/test_jsonutils.py @@ -17,13 +17,13 @@ import datetime import StringIO -import unittest +import testtools import xmlrpclib from openstack.common import jsonutils -class JSONUtilsTestCase(unittest.TestCase): +class JSONUtilsTestCase(testtools.TestCase): def test_dumps(self): self.assertEqual(jsonutils.dumps({'a': 'b'}), '{"a": "b"}') @@ -36,7 +36,7 @@ class JSONUtilsTestCase(unittest.TestCase): self.assertEqual(jsonutils.load(x), {'a': 'b'}) -class ToPrimitiveTestCase(unittest.TestCase): +class ToPrimitiveTestCase(testtools.TestCase): def test_list(self): self.assertEquals(jsonutils.to_primitive([1, 2, 3]), [1, 2, 3]) |