本文整理汇总了Python中mkt.developers.tasks.region_email函数的典型用法代码示例。如果您正苦于以下问题:Python region_email函数的具体用法?Python region_email怎么用?Python region_email使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了region_email函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_email_for_several_new_regions
def test_email_for_several_new_regions(self):
tasks.region_email([self.app.id],
[mkt.regions.CA, mkt.regions.UK, mkt.regions.BR])
msg = mail.outbox[0]
eq_(msg.subject, '%s: New regions added to the Firefox Marketplace'
% self.app.name)
assert ' added a few new ' in msg.body
assert ': Brazil, Canada, and United Kingdom.' in msg.body
示例2: test_email_for_two_new_regions
def test_email_for_two_new_regions(self):
tasks.region_email([self.app.id], [mkt.regions.UK, mkt.regions.BR])
msg = mail.outbox[0]
eq_(msg.subject, "%s: New regions added to the Firefox Marketplace" % self.app.name)
eq_(msg.to, ["[email protected]"])
dev_url = "http://omg.org/developers/app/something-something/" "edit#details"
assert unicode(self.app.name) in msg.body
assert dev_url in msg.body
assert " added two new " in msg.body
assert ": Brazil and United Kingdom." in msg.body
示例3: test_email_for_one_new_region
def test_email_for_one_new_region(self):
tasks.region_email([self.app.id], [mkt.regions.BR])
msg = mail.outbox[0]
eq_(msg.subject, '%s: Brazil region added to the Firefox Marketplace'
% self.app.name)
eq_(msg.to, ['[email protected]'])
dev_url = ('http://omg.org/developers/app/something-something/'
'edit#details')
assert unicode(self.app.name) in msg.body
assert dev_url in msg.body
assert ' added a new ' in msg.body
assert ' for Brazil.' in msg.body
示例4: test_email_for_two_new_regions
def test_email_for_two_new_regions(self):
tasks.region_email([self.app.id],
[mkt.regions.GBR.id, mkt.regions.BRA.id])
msg = mail.outbox[0]
eq_(msg.subject, '%s: New regions added to the Firefox Marketplace'
% self.app.name)
eq_(msg.to, ['[email protected]'])
dev_url = ('http://omg.org/developers/app/something-something/'
'edit#details')
assert unicode(self.app.name) in msg.body
assert dev_url in msg.body
assert ' added two new ' in msg.body
assert ': Brazil and United Kingdom.' in msg.body
示例5: test_email_for_several_new_regions
def test_email_for_several_new_regions(self):
tasks.region_email([self.app.id], [mkt.regions.UK, mkt.regions.US, mkt.regions.BR])
msg = mail.outbox[0]
eq_(msg.subject, "%s: New regions added to the Firefox Marketplace" % self.app.name)
assert " added a few new " in msg.body
assert ": Brazil, United Kingdom, and United States." in msg.body