def setUp(self):
        """
        Create a L{dns.DNSDatagramProtocol} with a deterministic clock.
        """
        self.clock = task.Clock()
        self.controller = TestController()
        self.proto = dns.DNSDatagramProtocol(self.controller)
        transport = proto_helpers.FakeDatagramTransport()
        self.proto.makeConnection(transport)
        self.proto.callLater = self.clock.callLater

        Create a L{dns.DNSDatagramProtocol} with a deterministic clock.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py