from unittest import TestCase as BaseTestCase
from inflection import underscore
class TestCase(BaseTestCase):
def setUp(self):
if hasattr(self, 'set_up'):
self.set_up()
def tearDown(self):
if hasattr(self, 'tear_down'):
self.tear_down()
for method in dir(TestCase):
if method.startswith('assert'):
ext_method = underscore(method)
setattr(TestCase, ext_method, getattr(TestCase, method))