'L{LocalWorker.childDataReceived} forwards the received data to linked
L{AMP} protocol if the right file descriptor, otherwise forwards to
C{ProcessProtocol.childDataReceived}.'

def test_childDataReceived(self):

    fakeTransport = FakeTransport()
    localWorker = LocalWorker(FakeAMProtocol(), '.', 'test.log')
    localWorker.makeConnection(fakeTransport)
    localWorker._outLog = StringIO()
    localWorker.childDataReceived(4, 'foo')
    localWorker.childDataReceived(1, 'bar')
    self.assertEqual('foo', localWorker._ampProtocol.dataString)
    self.assertEqual('bar', localWorker._outLog.getvalue())
