def tearDown(self):
        """
        Clean up any server connections associated with the
        L{DNSServerFactory} created in L{setUp}
        """
        # It'd be great if DNSServerFactory had a method that
        # encapsulated this task.  At least the necessary data is
        # available, though.
        for conn in self.factory.connections[:]:
            conn.transport.loseConnection()

        return waitUntilAllDisconnected(reactor, self.factory.connections[:])

        Clean up any server connections associated with the
        L{DNSServerFactory} created in L{setUp}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_names.py