コード例 #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
        )