#NEWLINE# @ mock . patch . object ( seamicro , '_parse_driver_info' , autospec = True ) #NEWLINE# def test_vendor_passthru_validate_parse_driver_info_fail( self , mock_info ) : #NEWLINE# #INDENT# mock_info . side_effect = iter ( [ exception . InvalidParameterValue ( 'bad' ) ] ) #NEWLINE# with task_manager . acquire ( self . context , self . node [ 'uuid' ] , shared = True ) as task : #NEWLINE# #INDENT# method = list ( task . driver . vendor . vendor_routes ) [ 0 ] #NEWLINE# self . assertRaises ( exception . InvalidParameterValue , task . driver . vendor . validate , task , ** { #NEWLINE# #INDENT# 'method' : method , #NEWLINE# #UNINDENT# } ) #NEWLINE# mock_info . assert_called_once_with ( task . node )