Yes, I'm using trunk (1.2). Thanks Russell, that helped. On Fri, Apr 23, 2010 at 1:59 PM, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Fri, Apr 23, 2010 at 6:27 PM, Vasil Vangelovski > <vvangelov...@gmail.com> wrote: >> Is there a way to run unit tests in such a way that email will be sent >> via the SMTP email backend when there's a call to send_mail in the >> unit test? > > In 1.1; no. In 1.1, Django has a single mail API, and the test setup > code replaces that API with a mock during setup. The only way to send > mail would be to open a Python SMTP connection instead of using > Django's mail API. > > However, in trunk (soon to be 1.2), it is possible. Although the > default mail API is still mocked out, you can manually instantiate an > SMTP connection. See [1] for more details. > > [1] > http://docs.djangoproject.com/en/dev/topics/email/#obtaining-an-instance-of-an-e-mail-backend > > Yours, > Russ Magee %-) > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.