#NEWLINE# def test_request_instance( self ) : #NEWLINE# #INDENT# nm . create_instance ( '10.1.201.10' , 9000 ) #NEWLINE# nm . create_instance ( '10.1.201.10' , 9001 ) #NEWLINE# nm . create_instance ( '10.1.201.12' , 6376 ) #NEWLINE# cluster_id = clu . create_cluster ( 'forgot-me-not' ) #NEWLINE# i = sorted ( list ( nm . list_all_nodes ( ) ) , key = ( lambda x : ( x . host , x . port ) ) ) #NEWLINE# self . assertEqual ( 3 , len ( i ) ) #NEWLINE# self . assertEqual ( ( '10.1.201.10' , 9000 , None ) , ( i [ 0 ] . host , i [ 0 ] . port , i [ 0 ] . assignee ) ) #NEWLINE# self . assertEqual ( ( '10.1.201.10' , 9001 , None ) , ( i [ 1 ] . host , i [ 1 ] . port , i [ 1 ] . assignee ) ) #NEWLINE# self . assertEqual ( ( '10.1.201.12' , 6376 , None ) , ( i [ 2 ] . host , i [ 2 ] . port , i [ 2 ] . assignee ) )