
import logging
import unittest

from openstack.common.gettextutils import _


LOG = logging.getLogger(__name__)


class GettextTest(unittest.TestCase):

    def test_gettext_does_not_blow_up(self):
        LOG.info(_('test'))


import logging
import testtools

from openstack.common.gettextutils import _


LOG = logging.getLogger(__name__)


class GettextTest(testtools.TestCase):

    def test_gettext_does_not_blow_up(self):
        LOG.info(_('test'))

Use testtools as test base class.
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

  
  import logging
- import unittest
+ import testtools
  
  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'))
  
Use testtools as test base class.
## Code Before:

import logging
import unittest

from openstack.common.gettextutils import _


LOG = logging.getLogger(__name__)


class GettextTest(unittest.TestCase):

    def test_gettext_does_not_blow_up(self):
        LOG.info(_('test'))

## Instruction:
Use testtools as test base class.
## Code After:

import logging
import testtools

from openstack.common.gettextutils import _


LOG = logging.getLogger(__name__)


class GettextTest(testtools.TestCase):

    def test_gettext_does_not_blow_up(self):
        LOG.info(_('test'))
