#NEWLINE# def test_refresh_nodes_and_tokens( self ) : #NEWLINE# #INDENT# self . control_connection . refresh_node_list_and_token_map ( ) #NEWLINE# meta = self . cluster . metadata #NEWLINE# self . assertEqual ( meta . partitioner , 'Murmur3Partitioner' ) #NEWLINE# self . assertEqual ( meta . cluster_name , 'foocluster' ) #NEWLINE# self . assertEqual ( sorted ( meta . all_hosts ( ) ) , sorted ( meta . token_map . keys ( ) ) ) #NEWLINE# for token_list in meta . token_map . values ( ) : #NEWLINE# #INDENT# self . assertEqual ( 3 , len ( token_list ) ) #NEWLINE# #UNINDENT# for host in meta . all_hosts ( ) : #NEWLINE# #INDENT# self . assertEqual ( host . datacenter , 'dc1' ) #NEWLINE# self . assertEqual ( host . rack , 'rack1' ) #NEWLINE# #UNINDENT# self . assertEqual ( self . connection . wait_for_responses . call_count , 1 )