#NEWLINE# def test_detectCanonicalNameLoop( self ) : #NEWLINE# #INDENT# '\n        If there is a cycle between I{CNAME} records in a response, this is\n        detected and the L{Deferred} returned by the lookup method fails\n        with L{ResolverError}.\n        ' #NEWLINE# servers = { #NEWLINE# #INDENT# ( '1.1.2.3' , 53 ) : { #NEWLINE# #INDENT# ( 'example.com' , A ) : { #NEWLINE# #INDENT# 'answers' : [ ( 'example.com' , Record_CNAME ( 'example.net' ) ) , ( 'example.net' , Record_CNAME ( 'example.com' ) ) ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# resolver = self . _getResolver ( servers ) #NEWLINE# d = resolver . lookupAddress ( 'example.com' ) #NEWLINE# return self . assertFailure ( d , ResolverError )