示例#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
示例#2
0
    def test_deliver_support_email(self):
        """ Deliver a contact email. """
        form = {
            'email': '*****@*****.**',
            'message': 'Test message from Snake Eyes.'
        }

        with mail.record_messages() as outbox:
            deliver_contact_email(form.get('email'), form.get('message'))

            assert len(outbox) == 1
            assert form.get('email') in outbox[0].body
    def test_deliver_support_email(self):
        """ Deliver a contact email. """
        form = {
          'email': '*****@*****.**',
          'message': 'Test message from Snake Eyes.'
        }

        with mail.record_messages() as outbox:
            deliver_contact_email(form.get('email'), form.get('message'))

            assert len(outbox) == 1
            assert form.get('email') in outbox[0].body
示例#4
0
    def test_deliver_support_email(self):
        """ Deliver a feedback email. """
        form = {
            'email': '*****@*****.**',
            'overall_experience': 'good',
            'playing_experience': 'good',
            'account_experience': 'good',
            'concerns': 'Test concerns'
        }

        with mail.record_messages() as outbox:
            deliver_feedback_email(form.get('email'),
                                   form.get('overall_experience'),
                                   form.get('playing_experience'),
                                   form.get('account_experience'),
                                   form.get('concerns'))

            assert len(outbox) == 1
            assert form.get('email') in outbox[0].body