本文整理汇总了Python中sentry.plugins.sentry_mail.models.MailProcessor.should_notify方法的典型用法代码示例。如果您正苦于以下问题:Python MailProcessor.should_notify方法的具体用法?Python MailProcessor.should_notify怎么用?Python MailProcessor.should_notify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sentry.plugins.sentry_mail.models.MailProcessor
的用法示例。
在下文中一共展示了MailProcessor.should_notify方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_should_notify_excluded
# 需要导入模块: from sentry.plugins.sentry_mail.models import MailProcessor [as 别名]
# 或者: from sentry.plugins.sentry_mail.models.MailProcessor import should_notify [as 别名]
def test_should_notify_excluded(self):
p = MailProcessor(min_level=None, exclude_loggers=['root'])
group = Mock(spec=Group)
group.project = Project()
group.level = 5
group.logger = 'root'
self.assertFalse(p.should_notify(group=group, event=Mock()))
示例2: test_should_notify_match
# 需要导入模块: from sentry.plugins.sentry_mail.models import MailProcessor [as 别名]
# 或者: from sentry.plugins.sentry_mail.models.MailProcessor import should_notify [as 别名]
def test_should_notify_match(self):
p = MailProcessor(min_level=None)
group = Mock(spec=Group)
group.level = 5
group.project = Project()
group.logger = 'root'
event = Mock()
event.data = {}
self.assertTrue
(p.should_notify(group=group, event=event))
示例3: test_should_notify_match
# 需要导入模块: from sentry.plugins.sentry_mail.models import MailProcessor [as 别名]
# 或者: from sentry.plugins.sentry_mail.models.MailProcessor import should_notify [as 别名]
def test_should_notify_match(self):
p = MailProcessor(min_level=None)
group = Mock(spec=Group)
group.level = 5
group.logger = 'root'
self.assertTrue(p.should_notify(group=group, event=Mock()))
示例4: test_should_notify_not_min_level
# 需要导入模块: from sentry.plugins.sentry_mail.models import MailProcessor [as 别名]
# 或者: from sentry.plugins.sentry_mail.models.MailProcessor import should_notify [as 别名]
def test_should_notify_not_min_level(self):
p = MailProcessor(min_level=2)
group = Mock(spec=Group)
group.level = 1
self.assertFalse(p.should_notify(group=group, event=Mock()))
示例5: test_should_notify_no_send_to
# 需要导入模块: from sentry.plugins.sentry_mail.models import MailProcessor [as 别名]
# 或者: from sentry.plugins.sentry_mail.models.MailProcessor import should_notify [as 别名]
def test_should_notify_no_send_to(self):
p = MailProcessor()
self.assertFalse(p.should_notify(group=Mock(), event=Mock()))
示例6: test_should_notify_not_included
# 需要导入模块: from sentry.plugins.sentry_mail.models import MailProcessor [as 别名]
# 或者: from sentry.plugins.sentry_mail.models.MailProcessor import should_notify [as 别名]
def test_should_notify_not_included(self):
p = MailProcessor(min_level=None, include_loggers=["foo"])
group = Mock(spec=Group)
group.level = 5
group.logger = "root"
self.assertFalse(p.should_notify(group=group, event=Mock()))