Author: julien Date: 2011-09-03 05:53:08 -0700 (Sat, 03 Sep 2011) New Revision: 16717
Modified: django/trunk/django/contrib/auth/tests/forms.py Log: Fixed #16412 -- Prevented a `contrib.auth` test from failing in the potential case where `contrib.sites` was not installed. Thanks to haras for the report and to Aymeric Augustin for the patch. Modified: django/trunk/django/contrib/auth/tests/forms.py =================================================================== --- django/trunk/django/contrib/auth/tests/forms.py 2011-09-02 03:47:49 UTC (rev 16716) +++ django/trunk/django/contrib/auth/tests/forms.py 2011-09-03 12:53:08 UTC (rev 16717) @@ -260,7 +260,10 @@ data = {'email': 'testcli...@example.com'} form = PasswordResetForm(data) self.assertTrue(form.is_valid()) - form.save() + # Since we're not providing a request object, we must provide a + # domain_override to prevent the save operation from failing in the + # potential case where contrib.sites is not installed. Refs #16412. + form.save(domain_override='example.com') self.assertEqual(len(mail.outbox), 1) self.assertEqual(mail.outbox[0].subject, u'Custom password reset on example.com') -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.