コード例 #1
0
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))
コード例 #2
0
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))
コード例 #3
0
    def init(self):
        '''This method is invoked automatically in order to set common dependencies for all test cases.'''

        self._formatter = DummyExceptionFormatter()
コード例 #4
0
    def init(self):
        '''This method is invoked automatically in order to set common dependencies for all test cases.'''

        self._formatter = DummyExceptionFormatter()