def test_legacyObservers(self):
        logs = []
        logger = app.AppLogger({})

        @implementer(LegacyILogObserver)
        class LoggerObserver(object):
            """
            An observer which implements the legacy L{LegacyILogObserver}.
            """
            def __call__(self, x):
                """
                Add C{x} to the logs list.
                """
                logs.append(x)

        logger._observerFactory = lambda: LoggerObserver()
        logger.start(Componentized())

        self.assertIn("starting up", textFromEventDict(logs[0]))
        warnings = self.flushWarnings(
            [self.test_legacyObservers])
        self.assertEqual(len(warnings), 0)
Test if get_template succeeds.
dataset/ETHPy150Open twisted/twisted/twisted/test/test_twistd.py/AppLoggerTests.test_legacyObservers--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cp_test.py/CpTestCase.test_get_dir_success