def __init__(self, listenException=None, connectException=None):
        """
        @param listenException: An instance of an L{Exception} to raise
            when any C{listen} method is called.

        @param connectException: An instance of an L{Exception} to raise
            when any C{connect} method is called.
        """
        self._listenException = listenException
        self._connectException = connectException

        @param listenException: An instance of an L{Exception} to raise
            when any C{listen} method is called.

        @param connectException: An instance of an L{Exception} to raise
            when any C{connect} method is called.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/testing.py