Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15545 closed (fixed)

admin_filterspecs tests fail on PostgreSQL

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

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 lrekucki 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 4 years ago by bberes

  • Component changed from Uncategorized to django.contrib.admin
  • Keywords blocker added
  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by lrekucki

comment:2 Changed 4 years ago by lrekucki

  • 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 Changed 4 years ago by russellm

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

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 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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