#NEWLINE# @ mock . patch . object ( FAKE_CLIENT . node , 'get_by_instance_uuid' ) #NEWLINE# def test__validate_instance_and_node( self , mock_gbiui ) : #NEWLINE# #INDENT# node_uuid = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' #NEWLINE# node = ironic_utils . get_test_node ( uuid = node_uuid , instance_uuid = self . instance_uuid ) #NEWLINE# instance = fake_instance . fake_instance_obj ( self . ctx , uuid = self . instance_uuid ) #NEWLINE# mock_gbiui . return_value = node #NEWLINE# result = self . driver . _validate_instance_and_node ( instance ) #NEWLINE# self . assertEqual ( result . uuid , node_uuid ) #NEWLINE# mock_gbiui . assert_called_once_with ( result . uuid , fields = ironic_driver . _NODE_FIELDS )