'Verify that the transport of a protocol connected to L{StandardIO}
is a working L{IConsumer} provider.'

def test_consumer(self):

    p = StandardIOTestProcessProtocol()
    d = p.onCompletion
    junkPath = self._junkPath()
    self._spawnProcess(p, 'stdio_test_consumer', junkPath)
    def processEnded(reason):
        with open(junkPath, 'rb') as f:
            self.assertEqual(p.data[1], f.read())
        reason.trap(error.ProcessDone)
    return self._requireFailure(d, processEnded)
