class DummyExceptionFormatterTests(FantasticoUnitTestsCase): '''This class provides the tests suite for DummyExceptionFormatter class.''' _formatter = None def init(self): '''This method is invoked automatically in order to set common dependencies for all test cases.''' self._formatter = DummyExceptionFormatter() def test_format_ex_ok(self): '''This test case ensures dummy formatter format_ex works as expected.''' for ex_desc in [None, {}, {"attr": "ok"}]: for ctx in [None, {}, {"attr": "ok"}]: self.assertEqual("", self._formatter.format_ex(ex_desc, ctx))
def init(self): '''This method is invoked automatically in order to set common dependencies for all test cases.''' self._formatter = DummyExceptionFormatter()