Opened 13 years ago

Closed 13 years ago

#16337 closed Bug (worksforme)

django.contrib.auth.forms.UserCreationFormTest.test_success fails

Reported by: tooxie Owned by: nobody
Component: contrib.auth Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

======================================================================
FAIL: test_success (django.contrib.auth.tests.forms.UserCreationFormTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/venv26/lib/python2.6/site-packages/django/contrib/auth/tests/forms.py", line 74, in test_success
    self.assertEqual(repr(u), '<User: jsmith@example.com>')
AssertionError: '<User: <jsmith@example.com>>' != '<User: jsmith@example.com>'

Attachments (1)

forms.patch (523 bytes ) - added by tooxie 13 years ago.
Patch.

Download all attachments as: .zip

Change History (2)

by tooxie, 13 years ago

Attachment: forms.patch added

Patch.

comment:1 by Aymeric Augustin, 13 years ago

Component: Formscontrib.auth
Resolution: worksforme
Status: newclosed
Type: UncategorizedBug

Tests pass without this patch.

trunk % cd tests
tests % PYTHONPATH=.. ./runtests.py --settings=test_sqlite auth
Creating test database for alias 'default'...
Creating test database for alias 'other'...
..........................................................................................................
----------------------------------------------------------------------
Ran 106 tests in 2.701s

OK
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

They no longer do if it's applied.

trunk % patch -p0 < ~/Downloads/forms.patch
patching file django/contrib/auth/tests/forms.py
Hunk #1 succeeded at 75 (offset 4 lines).
trunk % cd tests
tests % PYTHONPATH=.. ./runtests.py --settings=test_sqlite auth
Creating test database for alias 'default'...
Creating test database for alias 'other'...
........................................................................................................F.
======================================================================
FAIL: test_success (django.contrib.auth.tests.forms.UserCreationFormTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/myk/Desktop/django-trunk/django/contrib/auth/tests/forms.py", line 78, in test_success
    self.assertEqual(repr(u), '<User: <jsmith@example.com>>')
AssertionError: '<User: jsmith@example.com>' != '<User: <jsmith@example.com>>'

----------------------------------------------------------------------
Ran 106 tests in 2.656s

FAILED (failures=1)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

You've probably changed something to the User model, but it's hard to tell what with the information contained in your report.

Note: See TracTickets for help on using tickets.
Back to Top