本文整理汇总了Python中mkt.webapps.tasks.notify_developers_of_failure函数的典型用法代码示例。如果您正苦于以下问题:Python notify_developers_of_failure函数的具体用法?Python notify_developers_of_failure怎么用?Python notify_developers_of_failure使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了notify_developers_of_failure函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_notify_failure_lang
def test_notify_failure_lang(self):
user1 = UserProfile.objects.get(pk=999)
user2 = UserProfile.objects.get(pk=10482)
AddonUser.objects.create(addon=self.addon, user=user2)
user1.update(lang='de')
user2.update(lang='en')
notify_developers_of_failure(self.addon, 'blah')
eq_(len(mail.outbox), 2)
ok_(u'Mozilla Kugel' in mail.outbox[0].subject)
ok_(u'MozillaBall' in mail.outbox[1].subject)
示例2: test_notify_failure_lang
def test_notify_failure_lang(self):
user1 = UserProfile.objects.get(pk=999)
user2 = UserProfile.objects.get(pk=2519)
AddonUser.objects.create(addon=self.addon, user=user2)
user1.update(lang="de")
user2.update(lang="en")
notify_developers_of_failure(self.addon, "blah")
eq_(len(mail.outbox), 2)
ok_(u"Mozilla Kugel" in mail.outbox[0].subject)
ok_(u"MozillaBall" in mail.outbox[1].subject)
示例3: test_notify_failure_not_public
def test_notify_failure_not_public(self):
self.addon.update(status=amo.STATUS_PENDING)
notify_developers_of_failure(self.addon, 'blah')
eq_(len(mail.outbox), 0)
示例4: test_notify_failure_with_rereview
def test_notify_failure_with_rereview(self):
RereviewQueue.flag(self.addon, amo.LOG.REREVIEW_MANIFEST_CHANGE,
'This app is flagged!')
notify_developers_of_failure(self.addon, 'blah')
eq_(len(mail.outbox), 0)
示例5: test_notify_failure_not_public
def test_notify_failure_not_public(self):
self.webapp.update(status=mkt.STATUS_PENDING)
notify_developers_of_failure(self.webapp, 'blah')
eq_(len(mail.outbox), 0)