#NEWLINE# @ patch ( 'pybuilder.pluginloader._load_plugin' ) #NEWLINE# @ patch ( 'pybuilder.pluginloader._install_external_plugin' ) #NEWLINE# def test_should_import_plugin_when_requiring_plugin_and_plugin_is_found_as_third_party( self , install , load ) : #NEWLINE# #INDENT# project = Mock ( ) #NEWLINE# downloader = DownloadingPluginLoader ( Mock ( ) ) #NEWLINE# load . return_value = Mock ( ) #NEWLINE# self . assertEquals ( load . return_value , downloader . load_plugin ( install , 'spam' ) ) #NEWLINE# install . assert_not_called ( ) #NEWLINE# self . assertEquals ( install . call_count , 0 )