#NEWLINE# def test_get_bouncing_status( ) : #NEWLINE# #INDENT# with contextlib . nested ( mock . patch ( 'paasta_tools.marathon_serviceinit.marathon_tools.get_matching_appids' , autospec = True ) ) as ( mock_get_matching_appids , ) : #NEWLINE# #INDENT# mock_get_matching_appids . return_value = [ 'a' , 'b' ] #NEWLINE# mock_config = marathon_tools . MarathonServiceConfig ( service = 'fake_service' , cluster = 'fake_cluster' , instance = 'fake_instance' , config_dict = { #NEWLINE# #INDENT# 'bounce_method' : 'fake_bounce' , #NEWLINE# #UNINDENT# } , branch_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# actual = marathon_serviceinit . get_bouncing_status ( 'fake_service' , 'fake_instance' , 'unused' , mock_config ) #NEWLINE# assert ( 'fake_bounce' in mock_get_matching_appids ) #NEWLINE# assert ( 'Bouncing' in actual )