def test_send_event(self):
        fake_service = 'fake_service'
        fake_instance = 'fake_instance'
        fake_status = '42'
        fake_output = 'The http port is not open'
        fake_soa_dir = ''
        expected_check_name = 'setup_marathon_job.%s' % compose_job_id(fake_service, fake_instance)
        with contextlib.nested(
            mock.patch("paasta_tools.monitoring_tools.send_event", autospec=True),
            mock.patch("paasta_tools.marathon_tools.load_marathon_service_config", autospec=True),
            mock.patch("paasta_tools.setup_marathon_job.load_system_paasta_config", autospec=True),
        ) as (
            send_event_patch,
            load_marathon_service_config_patch,
            load_system_paasta_config_patch,
        ):
            load_system_paasta_config_patch.return_value.get_cluster = mock.Mock(return_value='fake_cluster')
            load_marathon_service_config_patch.return_value.get_monitoring.return_value = {}

            setup_marathon_job.send_event(
                fake_service,
                fake_instance,
                fake_soa_dir,
                fake_status,
                fake_output
            )

            send_event_patch.assert_called_once_with(
                fake_service,
                expected_check_name,
                {'alert_after': '10m', 'check_every': '10s'},
                fake_status,
                fake_output,
                fake_soa_dir
            )
            load_marathon_service_config_patch.assert_called_once_with(
                fake_service,
                fake_instance,
                load_system_paasta_config_patch.return_value.get_cluster.return_value,
                load_deployments=False,
                soa_dir=fake_soa_dir,
            )
dataset/ETHPy150Open Yelp/paasta/tests/test_setup_marathon_job.py/TestSetupMarathonJob.test_send_event/original