'C{execCommand} sets the C{HOME} environment variable to the avatar\'s home
directory.'

def testExecCommandEnvironment(self):

    mockReactor = MockProcessSpawner()
    homeDirectory = '/made/up/path/'
    avatar = StubUnixConchUser(homeDirectory)
    session = unix.SSHSessionForUnixConchUser(avatar, reactor=mockReactor)
    protocol = None
    command = ['not-actually-executed']
    session.execCommand(protocol, command)
    [call] = mockReactor._spawnProcessCalls
    self.assertEqual(homeDirectory, call['env']['HOME'])
