mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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') | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user