Code

Opened 3 years ago

Closed 3 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 3 years ago.
Patch.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by tooxie

Patch.

comment:1 Changed 3 years ago by aaugustin

  • Component changed from Forms to contrib.auth
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed
  • Type changed from Uncategorized to Bug

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.