Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#15545 closed (fixed)

admin_filterspecs tests fail on PostgreSQL

Reported by: Łukasz Rekucki Owned by: Łukasz Rekucki
Component: contrib.admin Version: dev
Severity: Keywords: postgresql blocker
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

======================================================================
FAIL: test_RelatedFilterSpec_ForeignKey (regressiontests.admin_filterspecs.tests.FilterSpecsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lrekucki/django/django-gh/tests/regressiontests/admin_filterspecs/tests.py", line 85, in test_RelatedFilterSpec_ForeignKey
    self.assertEqual(choices[1]['selected'], True)
AssertionError: False != True

======================================================================
FAIL: test_RelatedFilterSpec_ManyToMany (regressiontests.admin_filterspecs.tests.FilterSpecsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lrekucki/django/django-gh/tests/regressiontests/admin_filterspecs/tests.py", line 111, in test_RelatedFilterSpec_ManyToMany
    self.assertEqual(choices[2]['selected'], True)
AssertionError: False != True

======================================================================
FAIL: test_RelatedFilterSpec_reverse_relationships (regressiontests.admin_filterspecs.tests.FilterSpecsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lrekucki/django/django-gh/tests/regressiontests/admin_filterspecs/tests.py", line 139, in test_RelatedFilterSpec_reverse_relationships
    self.assertEqual(choices[1]['selected'], True)
AssertionError: False != True

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

Attachments (1)

ticket15545.diff (6.1 KB ) - added by Łukasz Rekucki 14 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Béres Botond, 14 years ago

Component: Uncategorizeddjango.contrib.admin
Keywords: blocker added
milestone: 1.3
Triage Stage: UnreviewedAccepted

by Łukasz Rekucki, 14 years ago

Attachment: ticket15545.diff added

comment:2 by Łukasz Rekucki, 14 years ago

Has patch: set

This and other failures result from false assumptions about primary keys and model ordering. This patch should make assertions db-independent.

comment:3 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

In [15741]:

Fixed #15545 -- Corrected the admin filterspecs tests to be non-dependent on PK allocation or model ordering. Thanks to Łukasz Rekucki for the report and patch.

comment:4 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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