def setUp(self):
        """
        Create a L{dns.DNSProtocol} with a deterministic clock.
        """
        self.clock = task.Clock()
        self.controller = TestTCPController()
        self.proto = dns.DNSProtocol(self.controller)
        self.proto.makeConnection(proto_helpers.StringTransport())
        self.proto.callLater = self.clock.callLater

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