def test_ns_lookup(self, query, rdtype='NS'):
        rrs = ['ns1.%s' % TEST_DOMAIN, TEST_DOMAIN % 'ns2.%s']
        query.return_value = make_answer(rdtype, answers=rrs)

        resp, code = self.lookup(rdtype)
        self.assert200(code)
        self.assertDictContainsSubset({
            'QuestionSection': {
                'Qclass': 'IN', 'Qtype': rdtype, 'Qname': 'testdomain.com.'},
            'AnswerSection': [
                {'Target': 'ns1.testdomain.com.', 'Class': 'IN',
                 'Name': TEST_DOMAIN, 'TTL': 60, 'Type': rdtype},
                {'Target': 'ns2.testdomain.com.', 'Class': 'IN',
                 'Name': TEST_DOMAIN, 'TTL': 60, 'Type': rdtype}
            ]
        }, resp)
dataset/ETHPy150Open opendns/OpenResolve/tests/test_util.py/ParseQueryTests.test_ns_lookup/swapped operands of `%`