def listenTCP(self, port, factory, backlog=50, interface=''):
        """
        Fake L{IReactorTCP.listenTCP}, that logs the call and
        returns an L{IListeningPort}.
        """
        self.tcpServers.append((port, factory, backlog, interface))
        if isIPv6Address(interface):
            address = IPv6Address('TCP', interface, port)
        else:
            address = IPv4Address('TCP', '0.0.0.0', port)
        return _FakePort(address)

        Fake L{IReactorTCP.listenTCP}, that logs the call and
        returns an L{IListeningPort}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/testing.py