Пример #1
0
    def test_skipunreadableposts_filter_should_ignore_records_without_exc_info(
            self):

        record = Mock()
        record.exc_info = None
        filter = SkipUnreadablePosts()
        self.assertTrue(filter.filter(record))
Пример #2
0
    def test_skipunreadableposts_filter_should_ignore_records_without_exc_info(self):

        record = Mock()
        record.exc_info = None
        filter = SkipUnreadablePosts()
        self.assertTrue(filter.filter(record))
Пример #3
0
    def test_skipunreadableposts_filter_should_ignore_general_exceptions(self):

        record = Mock()
        record.exc_info = (None, Exception())
        filter = SkipUnreadablePosts()
        self.assertTrue(filter.filter(record))
Пример #4
0
    def test_skipunreadableposts_filter(self):

        record = Mock()
        record.exc_info = (None, UnreadablePostError())
        filter = SkipUnreadablePosts()
        self.assertFalse(filter.filter(record))
Пример #5
0
    def test_skipunreadableposts_filter_should_ignore_general_exceptions(self):

        record = Mock()
        record.exc_info = (None, Exception())
        filter = SkipUnreadablePosts()
        self.assertTrue(filter.filter(record))
Пример #6
0
    def test_skipunreadableposts_filter(self):

        record = Mock()
        record.exc_info = (None, UnreadablePostError())
        filter = SkipUnreadablePosts()
        self.assertFalse(filter.filter(record))