#NEWLINE# @ patch ( 'pybuilder.pluginloader._load_plugin' ) #NEWLINE# @ patch ( 'pybuilder.pluginloader._install_external_plugin' ) #NEWLINE# def test_should_update_pypi_plugin_with_compound_non_exact_version_before_first_loading_attempt( 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 ( project , 'pypi:spam' , '>1.2,==1.4' ) ) #NEWLINE# install . assert_called_with ( install , 'pypi:spam' , '>1.2,==1.4' , downloader . logger , None , True , False ) #NEWLINE# self . assertEquals ( install . call_count , 1 )