def test_exec(self):
        """
        The I{exec} command runs its arguments locally in a child process
        using the user's shell.
        """
        self.database.addUser(
            getpass.getuser(), 'secret', os.getuid(), 1234, 'foo', 'bar',
            sys.executable)

        d = self.client._dispatchCommand("exec print(1 + 2)")
        d.addCallback(self.assertEqual, b"3\n")
        return d

        The I{exec} command runs its arguments locally in a child process
        using the user's shell.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_cftp.py