'Test a TTY spawnProcess: check the path of the client code:
fork, exec, exit.'

def test_mockForkTTY(self):

    cmd = '/mock/ouch'
    d = defer.Deferred()
    p = TrivialProcessProtocol(d)
    self.assertRaises(SystemError, reactor.spawnProcess, p, cmd, ['ouch'], env=None, usePTY=True)
    self.assertTrue(self.mockos.exited)
    self.assertEqual(self.mockos.actions, [('fork', False), 'setsid', 'exec', ('exit', 1)])
