#NEWLINE# def test_lookupAddress( self ) : #NEWLINE# #INDENT# '\n        L{root.Resolver.lookupAddress} looks up the I{A} records for the\n        specified hostname by first querying one of the root servers the\n        resolver was created with and then following the authority delegations\n        until a result is received.\n        ' #NEWLINE# servers = { #NEWLINE# #INDENT# ( '1.1.2.3' , 53 ) : { #NEWLINE# #INDENT# ( b'foo.example.com' , A ) : { #NEWLINE# #INDENT# 'authority' : [ ( b'foo.example.com' , Record_NS ( b'ns1.example.com' ) ) ] , #NEWLINE# 'additional' : [ ( b'ns1.example.com' , Record_A ( '34.55.89.144' ) ) ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# ( '34.55.89.144' , 53 ) : { #NEWLINE# #INDENT# ( b'foo.example.com' , A ) : { #NEWLINE# #INDENT# 'answers' : [ ( b'foo.example.com' , Record_A ( '10.0.0.1' ) ) ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# resolver = self . _getResolver ( servers ) #NEWLINE# d = resolver . lookupAddress ( b'foo.example.com' ) #NEWLINE# d . addCallback ( getOneAddress ) #NEWLINE# d . addCallback ( self . assertEqual , '10.0.0.1' ) #NEWLINE# return servers