#NEWLINE# def test_get_marathon_services_running_here_for_nerve_when_get_cluster_raises_custom_exception( self ) : #NEWLINE# #INDENT# cluster = None #NEWLINE# soa_dir = 'the_sound_of_music' #NEWLINE# with contextlib . nested ( mock . patch ( 'paasta_tools.marathon_tools.load_system_paasta_config' , autospec = True ) , mock . patch ( 'paasta_tools.marathon_tools.marathon_services_running_here' , autospec = True , return_value = [ ] ) ) as ( load_system_paasta_config_patch , marathon_services_running_here_patch ) : #NEWLINE# #INDENT# load_system_paasta_config_patch . return_value . get_cluster = mock . Mock ( side_effect = marathon_tools . PaastaNotConfiguredError ) #NEWLINE# actual = marathon_tools . get_marathon_services_running_here_for_nerve ( cluster , soa_dir ) #NEWLINE# assert ( actual == [ ] )