def test_mx_lookup(self, query, rdtype='MX'):
        rrs = [TEST_DOMAIN % '10 mx1.%s', '20 mx2.%s' % TEST_DOMAIN]
        query.return_value = make_answer(rdtype, answers=rrs)

        resp, code = self.lookup(rdtype)
        self.assert200(code)
        self.assertDictContainsSubset({
            'QuestionSection': {
                'Qclass': 'IN', 'Qtype': rdtype, 'Qname': TEST_DOMAIN
            },
            'AnswerSection': [
                {'Name': TEST_DOMAIN, 'Preference': 10,
                 'MailExchanger': 'mx1.%s' % TEST_DOMAIN, 'TTL': 60,
                 'Type': rdtype, 'Class': 'IN'},
                {'Name': TEST_DOMAIN, 'Preference': 20,
                 'MailExchanger': 'mx2.%s' % TEST_DOMAIN, 'TTL': 60,
                 'Type': rdtype, 'Class': 'IN'},
            ]
        }, resp)
dataset/ETHPy150Open opendns/OpenResolve/tests/test_util.py/ParseQueryTests.test_mx_lookup/swapped operands of `%`