#NEWLINE# def test_status_desired_state( ) : #NEWLINE# #INDENT# with mock . patch ( 'paasta_tools.marathon_serviceinit.get_bouncing_status' , autospec = True ) as mock_get_bouncing_status : #NEWLINE# #INDENT# mock_get_bouncing_status . return_value = 'Bouncing (fake_bounce)' #NEWLINE# fake_complete_config = mock . Mock ( ) #NEWLINE# fake_complete_config . get_desired_state_human = mock . Mock ( return_value = 'Started' ) #NEWLINE# actual = marathon_serviceinit . status_desired_state ( 'fake_service' , 'fake_instance' , 'unused' , fake_complete_config ) #NEWLINE# assert ( 'Started' in actual ) #NEWLINE# assert ( 'Bouncing' in actual )