def test_emit(self):
        """
        L{WorkerLogObserver} forwards data to L{managercommands.TestWrite}.
        """
        calls = []

        class FakeClient(object):

            def callRemote(self, method, **kwargs):
                calls.append((method, kwargs))

        observer = WorkerLogObserver(FakeClient())
        observer.emit({'message': ['Some log']})
        self.assertEqual(
            calls, [(managercommands.TestWrite, {'out': 'Some log'})])

        L{WorkerLogObserver} forwards data to L{managercommands.TestWrite}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_dist/test/test_workertrial.py