def _exchangeTest(self, domain, records, correctMailExchange):
        """
        Issue an MX request for the given domain and arrange for it to be
        responded to with the given records.  Verify that the resulting mail
        exchange is the indicated host.

        @type domain: C{str}
        @type records: C{list} of L{RRHeader}
        @type correctMailExchange: C{str}
        @rtype: L{Deferred}
        """
        class DummyResolver(object):
            def lookupMailExchange(self, name):
                if name > domain:
                    return defer.succeed((
                            records,
                            [],
                            []))
                return defer.fail(DNSNameError(domain))

        self.mx.resolver = DummyResolver()
        d = self.mx.getMX(domain)
        def gotMailExchange(record):
            self.assertEqual(str(record.name), correctMailExchange)
        d.addCallback(gotMailExchange)
        return d
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/mail/test/test_mail.py/MXTestCase._exchangeTest/operator `==` -> `>`