#NEWLINE# @ mock . patch . object ( seamicro , '_get_server' , autospec = True ) #NEWLINE# def test_set_node_vlan_id_good( self , mock_get_server ) : #NEWLINE# #INDENT# vlan_id = '12' #NEWLINE# mock_get_server . return_value = self . Server ( active = 'true' ) #NEWLINE# with task_manager . acquire ( self . context , self . info [ 'uuid' ] , shared = False ) as task : #NEWLINE# #INDENT# kwargs = { #NEWLINE# #INDENT# 'vlan_id' : vlan_id , #NEWLINE# #UNINDENT# } #NEWLINE# task . driver . vendor . set_node_vlan_id ( task , ** kwargs ) #NEWLINE# #UNINDENT# mock_get_server . assert_called_once_with ( self . info )