#NEWLINE# @ genty_dataset ( same_conf_path_different_exe_path = genty_args ( current_executable = join ( expanduser ( '~' ) , '.clusterrunner' , 'dist' , 'clusterrunner2' ) , in_use_conf_path = join ( expanduser ( '~' ) , '.clusterrunner' , 'clusterrunner.conf' ) , expect_deploy_conf = False , expect_deploy_binary = True ) , same_conf_path_same_exe_path = genty_args ( current_executable = join ( expanduser ( '~' ) , '.clusterrunner' , 'dist' , 'clusterrunner' ) , in_use_conf_path = join ( expanduser ( '~' ) , '.clusterrunner' , 'clusterrunner.conf' ) , expect_deploy_conf = False , expect_deploy_binary = False ) , different_conf_path_same_exe_path = genty_args ( current_executable = join ( expanduser ( '~' ) , '.clusterrunner' , 'dist' , 'clusterrunner' ) , in_use_conf_path = join ( expanduser ( '~' ) , '.clusterrunner' , 'clusterrunner2.conf' ) , expect_deploy_conf = True , expect_deploy_binary = False ) , different_conf_path_different_exe_path = genty_args ( current_executable = join ( expanduser ( '~' ) , '.clusterrunner' , 'dist' , 'clusterrunner2' ) , in_use_conf_path = join ( expanduser ( '~' ) , '.clusterrunner' , 'clusterrunner2.conf' ) , expect_deploy_conf = True , expect_deploy_binary = True ) ) #NEWLINE# def test_deploy_binaries_and_conf_behaves_properly_if_conf_or_binary_is_in_use_on_localhost( self , current_executable , in_use_conf_path , expect_deploy_conf , expect_deploy_binary ) : #NEWLINE# #INDENT# mock_DeployTarget = self . patch ( 'app.subcommands.deploy_subcommand.DeployTarget' ) #NEWLINE# mock_DeployTarget_instance = mock_DeployTarget . return_value #NEWLINE# deploy_subcommand = DeploySubcommand ( ) #NEWLINE# deploy_subcommand . _deploy_binaries_and_conf ( 'localhost' , 'username' , current_executable , join ( expanduser ( '~' ) , '.clusterrunner' , 'clusterrunner.tgz' ) , in_use_conf_path ) #NEWLINE# self . assertEqual ( expect_deploy_binary , mock_DeployTarget . deploy_binary . called ) #NEWLINE# self . assertEqual ( expect_deploy_conf , mock_DeployTarget_instance . deploy_conf . called )