本文整理汇总了Python中mkt.comm.utils_mail.save_from_email_reply函数的典型用法代码示例。如果您正苦于以下问题:Python save_from_email_reply函数的具体用法?Python save_from_email_reply怎么用?Python save_from_email_reply使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了save_from_email_reply函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_non_existent_token
def test_non_existent_token(self):
self.token.update(uuid='youtube?v=wn4RP57Y7bw')
assert not save_from_email_reply(self.email_base64)
示例2: test_with_invalid_msg
def test_with_invalid_msg(self):
assert not save_from_email_reply('youtube?v=WwJjts9FzxE')
示例3: test_with_max_count_token
def test_with_max_count_token(self):
# Test with an invalid token.
self.token.update(use_count=comm.MAX_TOKEN_USE_COUNT + 1)
assert not save_from_email_reply(self.email_base64)
示例4: test_with_unpermitted_token
def test_with_unpermitted_token(self):
"""Test when the token's user does not have a permission on thread."""
self.profile.groupuser_set.filter(
group__rules__contains='Apps:Review').delete()
assert not save_from_email_reply(self.email_base64)
示例5: test_developer_comment
def test_developer_comment(self):
self.profile.addonuser_set.create(addon=self.app)
note = save_from_email_reply(self.email_base64)
eq_(note.note_type, comm.DEVELOPER_COMMENT)
示例6: test_reviewer_comment
def test_reviewer_comment(self):
self.grant_permission(self.profile, 'Apps:Review')
note = save_from_email_reply(self.email_base64)
eq_(note.note_type, comm.REVIEWER_COMMENT)
示例7: test_successful_save
def test_successful_save(self):
note = save_from_email_reply(self.email_base64)
eq_(note.body, 'test note 5\n')
示例8: consume_email
def consume_email(email_text, **kwargs):
"""Parse emails and save notes."""
res = save_from_email_reply(email_text)
if not res:
log.error('Failed to save email.')
示例9: test_with_unpermitted_token
def test_with_unpermitted_token(self):
"""Test when the token's user does not have a permission on thread."""
self.profile.groupuser_set.all().delete()
assert not save_from_email_reply(self.email_base64)
示例10: test_reviewer_comment
def test_reviewer_comment(self):
self.grant_permission(self.profile, 'ContentTools:AddonReview')
note = save_from_email_reply(self.email_base64)
eq_(note.note_type, comm.REVIEWER_PUBLIC_COMMENT)
示例11: test_developer_comment
def test_developer_comment(self):
self.profile.extension_set.add(self.extension)
note = save_from_email_reply(self.email_base64)
eq_(note.note_type, comm.DEVELOPER_COMMENT)