Changeset 7726
- Timestamp:
- 06/23/08 07:17:57 (3 months ago)
- Files:
-
- django/trunk/django/contrib/auth/fixtures (deleted)
- django/trunk/django/contrib/auth/tests.py (modified) (2 diffs)
- django/trunk/django/contrib/auth/urls.py (deleted)
- django/trunk/tests/urls.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/auth/tests.py
r7716 r7726 1 1 """ 2 >>> from django.contrib.auth.models import User, AnonymousUser2 >>> from models import User, AnonymousUser 3 3 >>> u = User.objects.create_user('testuser', 'test@example.com', 'testpw') 4 4 >>> u.has_usable_password() … … 54 54 u'!' 55 55 """ 56 57 from django.test import TestCase58 from django.core import mail59 60 class PasswordResetTest(TestCase):61 fixtures = ['authtestdata.json']62 def test_email_not_found(self):63 response = self.client.get('/auth/password_reset/')64 self.assertEquals(response.status_code, 200)65 response = self.client.post('/auth/password_reset/', {'email': 'not_a_real_email@email.com'} )66 self.assertContains(response, "That e-mail address doesn't have an associated user account")67 self.assertEquals(len(mail.outbox), 0)68 69 def test_email_found(self):70 response = self.client.post('/auth/password_reset/', {'email': 'staffmember@example.com'} )71 self.assertEquals(response.status_code, 302)72 self.assertEquals(len(mail.outbox), 1)django/trunk/tests/urls.py
r7716 r7726 23 23 # test urlconf for syndication tests 24 24 (r'^syndication/', include('regressiontests.syndication.urls')), 25 26 # Other contrib apps27 (r'^auth/', include('django.contrib.auth.urls')),28 25 )
