#9470: PasswordResetTest.test_email_not_found built in test chokes on apostrophe
---------------------------+------------------------------------------------
 Reporter:  [EMAIL PROTECTED]   |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 This is my first bug report, so I apologize if it's cryptic :)

 I get the following error when running django's built-in tests:


 {{{
 ======================================================================
 FAIL: Error is raised if the provided email address isn't currently
 registered
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Applications/Django/django-
 trunk/django/contrib/auth/tests/views.py", line 21, in
 test_email_not_found
     self.assertContains(response, "That e-mail address doesn't have an
 associated user account")
   File "/Applications/Django/django-trunk/django/test/testcases.py", line
 274, in assertContains
     "Couldn't find '%s' in response" % text)
 AssertionError: Couldn't find 'That e-mail address doesn't have an
 associated user account' in response

 ----------------------------------------------------------------------

 }}}


 It seems the test is choking on the apostrophe.  Changing line 20 in
 django/contrib/auth/tests/views.py to the following solves the problem:
 {{{
 self.assertContains(response, "That e-mail address doesn")
 }}}


 or the following also works:

 {{{
 try:
         self.assertContains(response, "That e-mail address doesn't have an
 associated user account")
 except:
         self.assertContains(response, "That e-mail address doesn't
 have an associated user account.")
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9470>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to