def test_boundedQueries(self):
        servers = {
            ('1.1.2.3', 53): {
                # First query - force it to start over with a name lookup of
                # ns1.example.com
                ('example.com', A): {
                    'authority': [('example.com', Record_NS('ns1.example.com'))],
                },
                # Second query - let it resume the original lookup with the
                # address of the nameserver handling the delegation.
                ('ns1.example.com', A): {
                    'answers': [('ns1.example.com', Record_A('10.0.0.2'))],
                },
            },
            ('10.0.0.2', 53): {
                # Third query - let it jump straight to asking the
                # delegation server by including its address here (different
                # case from the first query).
                ('example.com', A): {
                    'authority': [('example.com', Record_NS('ns2.example.com'))],
                    'additional': [('ns2.example.com', Record_A('10.0.0.3'))],
                },
            },
            ('10.0.0.3', 53): {
                # Fourth query - give it the answer, we're done.
                ('example.com', A): {
                    'answers': [('example.com', Record_A('10.0.0.4'))],
                },
            },
        }

        # Make two resolvers.  One which is allowed to make 3 queries
        # maximum, and so will fail, and on which may make 4, and so should
        # succeed.
        failer = self._getResolver(servers, 3)
        failD = self.assertFailure(
            failer.lookupAddress('example.com'), ResolverError)

        succeeder = self._getResolver(servers, 4)
        succeedD = succeeder.lookupAddress('example.com')
        succeedD.addCallback(lambda (ans, auth, add): ans[0].payload)
        succeedD.addCallback(self.assertEquals, Record_A('10.0.0.4'))

        return gatherResults([failD, succeedD])
Naive case-insensitive search
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/names/test/test_rootresolve.py/RootResolverTests.test_boundedQueries--crossover with--dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/admin/roles/tables.py/RoleFilterAction.filter