def test_addObserverNotCallable(self):
        """
        L{LogPublisher.addObserver} refuses to add an observer that's
        not callable.
        """
        publisher = LogPublisher()
        self.assertRaises(TypeError, publisher.addObserver, object())

        L{LogPublisher.addObserver} refuses to add an observer that's
        not callable.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_observer.py