def test_observed(self):
        """
        The observer is called exactly once.
        """
        publishToNewObserver(
            self.observer, self.legacyEvent(), legacyLog.textFromEventDict
        )
        self.assertEqual(len(self.events), 1)

        The observer is called exactly once.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_legacy.py