Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8787 closed (fixed)

Tests are currently failing on django trunk

Reported by: Alex Gaynor Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: 1.0-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

It's the admin_widget tests.

Attachments (2)

django-admin-widget-test.diff (4.6 KB ) - added by Alex Gaynor 16 years ago.
django-admin-widget-test.2.diff (4.6 KB ) - added by Alex Gaynor 16 years ago.
Refactored methods for simplicty

Download all attachments as: .zip

Change History (7)

by Alex Gaynor, 16 years ago

comment:1 by Alex Gaynor, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Alex Gaynor, 16 years ago

Keywords: 1.0-blocker added

comment:3 by Malcolm Tredinnick, 16 years ago

Those two copies of url_parameters() is a bug waiting to happen (we'll update one and forget the other). Since the second case is in a class that inherits from the first, write a method that does the initial stuff (base_url_parameters()) and then url_parameters() in ForeignKeyRawIdWidget can call that and update the result, whilst url_parameters() in ManyToManyRawIdWidget can just be an alias to base_url_parameters() (or call it and do nothing). That way, you exploit the subclassing and factor out the common code.

Also, you seem to be doing some manual escaping in that string (I know you're only copying earlier code, but if it's a bug, we should fix it). Is it guaranteed that that's the only escaping needed? Can you use Python's query string construction code and then call escape()? I'm wondering whether it's possible to have say a double-quote or a closing angle bracket in the parameter values somehow.

by Alex Gaynor, 16 years ago

Refactored methods for simplicty

comment:4 by Brian Rosner, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in [8846]

comment:5 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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