def test_truncatedMessage(self):
        """
        Test that a truncated message results in an equivalent request made via
        TCP.
        """
        m = dns.Message(trunc=True)
        m.addQuery(b'example.com')

        def queryTCP(queries):
            self.assertEqual(queries, m.queries)
            response = dns.Message()
            response.answers = ['answer']
            response.authority = ['authority']
            response.additional = ['additional']
            return defer.succeed(response)
        self.resolver.queryTCP = queryTCP
        d = self.resolver.filterAnswers(m)
        d.addCallback(
            self.assertEqual, (['answer'], ['authority'], ['additional']))
        return d

        Test that a truncated message results in an equivalent request made via
        TCP.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_client.py