Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6833421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:58:34+00:00 2026-05-26T22:58:34+00:00

I have a Django-based web application that is required to send a confirmation email

  • 0

I have a Django-based web application that is required to send a confirmation email to the user on an attempt to change the registered email address. The functionality has been implemented, but the lettuce test intended to verify the contents of the email is failing.

To verify the operation, my plan was to use the file backend (EMAIL_BACKEND = ‘django.core.mail.backends.filebased.EmailBackend’) then verify the contents of the file within my lettuce step.

When running “normally” (e.g. via manage.py runserver), the email file is created as expected. When run via lettuce (manage.py harvest), the web site appears to be getting driven correctly (I’m using Selenium to drive it) but no email file is generated.

What have I missed? Is there some setting (e.g. in the terrain.py file) I need to use so the file backend is also used during the test process?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:58:34+00:00Added an answer on May 26, 2026 at 10:58 pm

    You can use django.core.mail.outbox as described in django docs https://docs.djangoproject.com/en/dev/topics/testing/#email-services

    from django.core import mail
    
    assert len(mail.outbox) == 1
    assert mail.outbox[0].subject == 'Subject here'
    

    Lettuse uses django.test.utils.setup_test_environment that overrides email backend to the locmem email backend.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a web based application in production built using django. It is deployed
I have a web application which will return a user id based on the
I'm working on a user based, social networking type of web application in Django.
In our web application (django based, with solr backend) we have some checkboxes with
I have a Django form that uses a different number of fields based on
I'm building from scratch a web application that is not trivial (have some algorithms
I'm planning a web application using Django, and it's based on a big pile
I'm developing an web application that uses a non-relational database as a backend (django-nonrel
I have a web application im currently working on in python. I'm using Django
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.