#NEWLINE# def test_main_object_hosts_default_all_policies( self ) : #NEWLINE# #INDENT# self . _make_object_rings ( ) #NEWLINE# discovered_hosts = set ( ) #NEWLINE# def server_type_check( hosts ) : #NEWLINE# #INDENT# for h in hosts : #NEWLINE# #INDENT# discovered_hosts . add ( h ) #NEWLINE# #UNINDENT# #UNINDENT# self . recon_instance . server_type_check = server_type_check #NEWLINE# with mock . patch . object ( sys , 'argv' , [ 'prog' , 'object' , ( '--swiftdir=%s' % self . swift_dir ) , '--validate-servers' ] ) : #NEWLINE# #INDENT# self . recon_instance . main ( ) #NEWLINE# #UNINDENT# expected = set ( [ ( '127.0.0.1' , 10000 ) , ( '127.0.0.1' , 10001 ) , ( '127.0.0.1' , 10002 ) , ( '127.0.0.1' , 10003 ) , ( '127.0.0.2' , 10004 ) ] ) #NEWLINE# self . assertEqual ( expected , discovered_hosts )