예제 #1
0
파일: tests.py 프로젝트: yan5lang/sentry
    def test_does_fire_jobs(self, check_project_alerts):
        project = self.create_project()

        check_alerts()

        check_project_alerts.delay.assert_any_call(project_id=project.id,
                                                   expires=120)
예제 #2
0
파일: tests.py 프로젝트: BlueMoebius/sentry
    def test_does_fire_jobs(self, check_project_alerts):
        project = self.create_project()

        check_alerts()

        check_project_alerts.apply_async.assert_any_call(
            kwargs=dict(project_id=project.id),
            expires=120,
        )
예제 #3
0
파일: tests.py 프로젝트: Superdense/sentry
    def test_does_fire_jobs(self, check_project_alerts):
        project = self.create_project()

        check_alerts()

        check_project_alerts.delay.assert_any_call(
            project_id=project.id,
            expires=120
        )
예제 #4
0
파일: tests.py 프로젝트: zhchwolf/sentry
    def test_does_fire_jobs(self, check_project_alerts):
        project = self.create_project()

        check_alerts()

        check_project_alerts.apply_async.assert_any_call(
            kwargs=dict(project_id=project.id),
            expires=120,
        )
예제 #5
0
파일: tests.py 프로젝트: xssworm/sentry
    def test_does_fire_jobs(self, check_project_alerts):
        when = timezone.now()
        self.create_counts(when, 50, 5, normalize=False)

        with mock.patch('sentry.tasks.check_alerts.timezone.now') as now:
            now.return_value = when
            check_alerts()
            now.assert_called_once_with()

        check_project_alerts.delay.assert_called_once_with(
            project_id=self.project.id,
            when=when - timedelta(minutes=1),
            count=10,
            expires=120)
예제 #6
0
파일: tests.py 프로젝트: 755/sentry
    def test_does_fire_jobs(self, check_project_alerts):
        when = timezone.now()
        self.create_counts(when, 50, 5, normalize=False)

        with mock.patch('sentry.tasks.check_alerts.timezone.now') as now:
            now.return_value = when
            check_alerts()
            now.assert_called_once_with()

        check_project_alerts.delay.assert_called_once_with(
            project_id=self.project.id,
            when=when - timedelta(minutes=1),
            count=10,
            expires=120
        )