Ticket #9381: 9383.diff

File 9383.diff, 756 bytes (added by kit1980, 16 years ago)
  • django/contrib/auth/tests/views.py

     
    3434        return self._read_signup_email(mail.outbox[0])
    3535
    3636    def _read_signup_email(self, email):
    37         urlmatch = re.search(r"https?://[^/]*(/.*reset/\S*)", email.body)
     37        urlmatch = re.search(r"https?://.*(/.+/)", email.body)
    3838        self.assert_(urlmatch is not None, "No URL found in sent email")
    39         return urlmatch.group(), urlmatch.groups()[0]
     39        return urlmatch.group(), "/reset" + urlmatch.groups()[0]
    4040
    4141    def test_confirm_valid(self):
    4242        url, path = self._test_confirm_start()
Back to Top