def test_responseType(self):
        """
        L{dns._responseFromMessage} returns a new instance of C{cls}
        """
        class SuppliedClass(object):
            id = 1
            queries = []

        expectedClass = dns.Message

        self.assertIsInstance(
            dns._responseFromMessage(responseConstructor=expectedClass,
                                     message=SuppliedClass()),
            expectedClass
        )

        L{dns._responseFromMessage} returns a new instance of C{cls}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py