'If the subprocess exits with exit code 0, the bytes output by its
stdout are returned as the result of the ``Deferred`` returned from
``zfs_command``.'

def test_normal_exit(self):

    reactor = FakeProcessReactor()
    result = zfs_command(reactor, ['-H', 'lalala'])
    process_protocol = reactor.processes[0].processProtocol
    process_protocol.childDataReceived(1, 'abc')
    process_protocol.childDataReceived(1, 'def')
    process_protocol.processEnded(Failure(ProcessDone(0)))
    self.assertEqual(self.successResultOf(result), 'abcdef')
