Opened 5 years ago

Closed 5 years ago

#16183 closed Bug (fixed)

Incorrect test in contrib.auth silently passes

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


There are a test case: [source:django/trunk/django/contrib/auth/tests/ auth.TestAuthPermissions]. It checks that the ordering of autogenerated permissions is the same (ticket 14731) by creating permissions and trying to load fixture, then checking that 'loaddata' passed with clean stderr.

The problem is that this fixture ("test_permissions.json") has been checked in with different name ("permissionstestdata.json"). The bigger problem is that "loaddata test_permissions.json" yields "No fixtures found." in stdout, leaving stderr clean. So the test was here and passed without an error since checkin.

Attaching patch that fixes fixture name and the fixture itself (as it contains contenttype for legacy auth.Message model which breaks the test).

Attachments (1)

auth_permissions_test_fix_20110609.diff (2.0 KB) - added by desh 5 years ago.
Initial patch

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by desh

Initial patch

comment:1 Changed 5 years ago by desh

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to desh
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 5 years ago by vladmos

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 5 years ago by vladmos

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 5 years ago by jezdez

  • Resolution set to fixed
  • Status changed from assigned to closed

In [16400]:

Fixed #16183 -- Fixed an ignored auth test. Thanks, desh.

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