#12393 closed (fixed)
testGenericInlineFormset fails on Postgres
Reported by: | Karen Tracey | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
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 by , 15 years ago
Version: | 1.1 → SVN |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
(In [11905]) Fixed #12393 -- Parameterized the form output in the testGenericInlineFormset test to avoid database PK problems. Thanks to Karen for the report.