#NEWLINE# def test_compute_node_get_all( self ) : #NEWLINE# #INDENT# self . _setup_attrs ( up = False ) #NEWLINE# ctxt = self . ctxt . elevated ( ) #NEWLINE# self . mox . StubOutWithMock ( objects . ComputeNodeList , 'get_all' ) #NEWLINE# objects . ComputeNodeList . get_all ( mox . IgnoreArg ( ) ) . AndReturn ( [ 4 , 5 ] ) #NEWLINE# objects . ComputeNodeList . get_all ( mox . IgnoreArg ( ) ) . AndReturn ( [ 3 ] ) #NEWLINE# objects . ComputeNodeList . get_all ( mox . IgnoreArg ( ) ) . AndReturn ( [ 1 , 2 ] ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# responses = self . src_msg_runner . compute_node_get_all ( ctxt ) #NEWLINE# response_values = [ ( resp . cell_name , resp . value_or_raise ( ) ) for resp in response_values ] #NEWLINE# expected = [ ( 'api-cell!child-cell2!grandchild-cell1' , [ 4 , 5 ] ) , ( 'api-cell!child-cell2' , [ 3 ] ) , ( 'api-cell' , [ 1 , 2 ] ) ] #NEWLINE# self . assertEqual ( expected , response_values )