#NEWLINE# @ given ( 'an old app to be destroyed' ) #NEWLINE# def given_an_old_app_to_be_destroyed( context ) : #NEWLINE# #INDENT# old_app_name = 'bounce.test1.oldapp.confighash' #NEWLINE# context . old_ids = [ old_app_name ] #NEWLINE# context . old_app_config = { #NEWLINE# #INDENT# 'id' : old_app_name , #NEWLINE# 'cmd' : '/bin/sleep 300' , #NEWLINE# 'instances' : 2 , #NEWLINE# 'backoff_seconds' : 1 , #NEWLINE# 'backoff_factor' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# with contextlib . nested ( mock . patch ( 'paasta_tools.bounce_lib.create_app_lock' ) ) as ( mock_creat_app_lock , ) : #NEWLINE# #INDENT# bounce_lib . create_marathon_app ( old_app_name , context . old_app_config , context . marathon_client )