'When a client requests a command, the SSHSession object should get
the command by getting an ISession adapter for the avatar, then
calling execCommand with a ProcessProtocol to attach and the
command line.'

def test_requestExec(self):

    ret = self.session.requestReceived('exec', common.NS('failure'))
    self.assertFalse(ret)
    self.assertRequestRaisedRuntimeError()
    self.assertIsNone(self.session.client)
    self.assertTrue(self.session.requestReceived('exec', common.NS('success')))
    self.assertSessionIsStubSession()
    self.assertIsInstance(self.session.client, session.SSHSessionProcessProtocol)
    self.assertIs(self.session.session.execProtocol, self.session.client)
    self.assertEqual(self.session.session.execCommandLine, 'success')
