def testExecCommandEnvironment(self):
        """
        C{execCommand} sets the C{HOME} environment variable to the avatar's home
        directory.
        """
        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'])

        C{execCommand} sets the C{HOME} environment variable to the avatar's home
        directory.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_unix.py