Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12393 closed (fixed)

testGenericInlineFormset fails on Postgres

Reported by: kmtracey Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The testGenericInlineFormset test added in r11885 is failing for me on PosgreSQL:

======================================================================
FAIL: testGenericInlineFormset (regressiontests.generic_inline_admin.tests.GenericAdminViewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\u\kmt\django\trunk\tests\regressiontests\generic_inline_admin\tests.py", line 92, in testGenericInlineFormset
    self.assertEquals(formset.forms[0].as_p(), '<p><label for="id_generic_inline_admin-media-content_type-object_id-0-url">Url:</label> <input id="id_generic_inline_admin-media-content_type-object_id-0-url" type="text" name="generic_inline_admin-media-content_type-object_id-0-url" value="http://example.com/podcast.mp3" maxlength="200" /><input type="hidden" name="generic_inline_admin-media-content_type-object_id-0-id" value="1" id="id_generic_inline_admin-media-content_type-object_id-0-id" /></p>')
AssertionError: u'<p><label for="id_generic_inline_admin-media-content_type-object_id-0-url">Url:</label> <input id="id_generic_inline_admin-media-content_type-object_id-0-url" type="text" name="generic_inline_admin-media-content_type-object_id-0-url" value="http://example.com/podcast.mp3" maxlength="200" /><input type="hidden" name="generic_inline_admin-media-content_type-object_id-0-id" value="9" id="id_generic_inline_admin-media-content_type-object_id-0-id" /></p>'
!=               '<p><label for="id_generic_inline_admin-media-content_type-object_id-0-url">Url:</label> <input id="id_generic_inline_admin-media-content_type-object_id-0-url" type="text" name="generic_inline_admin-media-content_type-object_id-0-url" value="http://example.com/podcast.mp3" maxlength="200" /><input type="hidden" name="generic_inline_admin-media-content_type-object_id-0-id" value="1" id="id_generic_inline_admin-media-content_type-object_id-0-id" /></p>'

----------------------------------------------------------------------
Ran 10 tests in 4.828s

FAILED (failures=1)
Destroying test database...

(Slightly reformatted to line up the mismatch.) Test is expecting value="9" but getting value="1".

Change History (3)

comment:1 Changed 5 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.1 to SVN

comment:2 Changed 5 years ago by russellm

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

(In [11905]) Fixed #12393 -- Parameterized the form output in the testGenericInlineFormset test to avoid database PK problems. Thanks to Karen for the report.

comment:3 Changed 5 years ago by russellm

(In [11906]) [1.1.X] Fixed #12393 -- Parameterized the form output in the testGenericInlineFormset test to avoid database PK problems. Thanks to Karen for the report.

Backport of r11905 from trunk.

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