def test_call(self):
        """
        Test filtering results from each predicate type.
        """
        e = dict(obj=object())

        def callWithPredicateResult(result):
            seen = []
            observer = FilteringLogObserver(
                lambda e: seen.append(e),
                (lambda e: result,)
            )
            observer(e)
            return seen

        self.assertIn(e, callWithPredicateResult(PredicateResult.yes))
        self.assertIn(e, callWithPredicateResult(PredicateResult.maybe))
        self.assertNotIn(e, callWithPredicateResult(PredicateResult.no))

        Test filtering results from each predicate type.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_filter.py