def test_lookupChecksClass(self):
        """
        If a response includes a record with a class different from the one
        in the query, it is ignored and lookup continues until a record with
        the right class is found.
        """
        badClass = Record_A('10.0.0.1')
        badClass.CLASS = HS
        servers = {
            ('1.1.2.3', 53): {
                (b'foo.example.com', A): {
                    'answers': [(b'foo.example.com', badClass)],
                    'authority': [(b'foo.example.com', Record_NS(b'ns1.example.com'))],
                    'additional': [(b'ns1.example.com', Record_A('10.0.0.2'))],
                },
            },
            ('10.0.0.2', 53): {
                (b'foo.example.com', A): {
                    'answers': [(b'foo.example.com', Record_A('10.0.0.3'))],
                },
            },
        }
        resolver = self._getResolver(servers)
        d = resolver.lookupAddress(b'foo.example.com')
        d.addCallback(getOnePayload)
        d.addCallback(self.assertEqual, Record_A('10.0.0.3'))
        return d

        If a response includes a record with a class different from the one
        in the query, it is ignored and lookup continues until a record with
        the right class is found.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_rootresolve.py