Exemplo n.º 1
0
    def test_deliver_password_reset_email(self, token):
        """ Deliver a password reset email. """
        with mail.record_messages() as outbox:
            user = User.find_by_identity('*****@*****.**')
            deliver_password_reset_email(user.id, token)

            assert len(outbox) == 1
            assert token in outbox[0].body
    def test_deliver_support_email(self, issues):
        """ Deliver a support email. """
        with mail.record_messages() as outbox:
            issue = Issue.query.filter(Issue.email == '*****@*****.**') \
                .first()
            deliver_support_email(issue.id)

            assert len(outbox) == 1
            assert issue.email in outbox[0].body