'L{LocalWorkerAMP.testWrite} writes the data received to its test
stream.'

def test_testWrite(self):

    results = []
    stream = StringIO()
    self.managerAMP.setTestStream(stream)
    d = self.worker.callRemote(managercommands.TestWrite, out='Some    output')
    d.addCallback((lambda result: results.append(result['success'])))
    self.pumpTransports()
    self.assertEqual('Some    output\n', stream.getvalue())
    self.assertTrue(results)
