#NEWLINE# @ patch ( 'pybuilder.pluginloader._load_plugin' ) #NEWLINE# def test_should_raise_exception_when_requiring_plugin_and_plugin_is_not_found( self , load ) : #NEWLINE# #INDENT# load . side_effect = MissingPluginException ( 'pybuilder.plugins.spam_plugin' ) #NEWLINE# self . assertRaises ( MissingPluginException , self . loader . load_plugin , self . project , 'spam' ) #NEWLINE# load . assert_called_with ( 'pybuilder.plugins.spam_plugin' , 'spam' )