'If there is a cycle between I{CNAME} records in a response, this is
detected and the L{Deferred} returned by the lookup method fails
with L{ResolverError}.'

def test_detectCanonicalNameLoop(self):

    servers = {('1.1.2.3', 53): {('example.com', A): {'answers': [('example.com', Record_CNAME('example.net')), ('example.net', Record_CNAME('example.com'))]}}}
    resolver = self._getResolver(servers)
    d = resolver.lookupAddress('example.com')
    return self.assertFailure(d, ResolverError)
