#NEWLINE# @ patch ( 'pybuilder.pluginloader._load_plugin' ) #NEWLINE# @ patch ( 'pybuilder.pluginloader._install_external_plugin' ) #NEWLINE# def test_should_load_module_after_downloading_with_pypi_when_download_succeeds( self , _ , load ) : #NEWLINE# #INDENT# project = Mock ( ) #NEWLINE# downloader = DownloadingPluginLoader ( Mock ( ) ) #NEWLINE# plugin = downloader . load_plugin ( project , 'pypi:external_plugin' ) #NEWLINE# load . assert_called_with ( 'external_plugin' , 'pypi:external_plugin' ) #NEWLINE# self . assertEquals ( plugin , load . return_value )