当前位置: 首页>>代码示例>>Python>>正文


Python MailProcessor.should_notify方法代码示例

本文整理汇总了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()))
开发者ID:DamianZaremba,项目名称:sentry,代码行数:9,代码来源:tests.py

示例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))
开发者ID:DamianZaremba,项目名称:sentry,代码行数:13,代码来源:tests.py

示例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()))
开发者ID:Crowdbooster,项目名称:sentry,代码行数:8,代码来源:tests.py

示例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()))
开发者ID:Crowdbooster,项目名称:sentry,代码行数:7,代码来源:tests.py

示例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()))
开发者ID:Crowdbooster,项目名称:sentry,代码行数:5,代码来源:tests.py

示例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()))
开发者ID:urbaniak,项目名称:sentry,代码行数:8,代码来源:tests.py


注:本文中的sentry.plugins.sentry_mail.models.MailProcessor.should_notify方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。