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
This commit is contained in:
Monty Taylor 2013-01-22 19:54:57 -05:00
parent d99c327f0a
commit 98b0eb3d49
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
# under the License.
import logging
import unittest
import testtools
from openstack.common.gettextutils import _
@ -24,7 +24,7 @@ from openstack.common.gettextutils import _
LOG = logging.getLogger(__name__)
class GettextTest(unittest.TestCase):
class GettextTest(testtools.TestCase):
def test_gettext_does_not_blow_up(self):
LOG.info(_('test'))