'Initialize the session and create a reference to it on the avatar for
later inspection.'

def __init__(self, avatar):

    self.avatar = avatar
    self.avatar._testSession = self
    self.cmd = None
    self.proto = None
    self.ptyReq = False
    self.eof = 0
    self.onClose = defer.Deferred()
