diff options
| author | Julien Phalip <jphalip@gmail.com> | 2011-09-03 12:53:08 +0000 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2011-09-03 12:53:08 +0000 |
| commit | 09fc775f42c8c0788661821fe43b2bf51281399d (patch) | |
| tree | 7a99cf5af034f7a7eb1ffa41dbceddd113d3ea61 | |
| parent | 5c1b4ab75b487d7cb77ba1959a7e576f05ca4618 (diff) | |
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/auth/tests/forms.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/auth/tests/forms.py b/django/contrib/auth/tests/forms.py index 9b557d18bf..429967cba0 100644 --- a/django/contrib/auth/tests/forms.py +++ b/django/contrib/auth/tests/forms.py @@ -260,7 +260,10 @@ class PasswordResetFormTest(TestCase): data = {'email': 'testclient@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') |
