Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12367 closed (fixed)

Test suite raises deprecation warning for URLConf using admin.site.root.

Reported by: Cliff Dyer Owned by: Cliff Dyer
Component: Testing framework Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Part of the test suite still uses admin.site.root, and is raising DeprecationWarnings during the running of the test suite.

See, for instance, django/tests/regressiontests/generic_inline_admin/urls.py and django/tests/regressiontests/admin_widgets/urls2.py. I suspect neither of these are actively testing admin.site.root, so they should be updated to use the new method. If the old method needs to be tested, (and maybe it already is) the test should handle the DeprecationWarning, rather than letting it fall through to the test runner.

Attachments (1)

12367.diff (932 bytes) - added by Travis Cline <travis.cline@…> 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Travis Cline <travis.cline@…>

Attachment: 12367.diff added

comment:1 Changed 7 years ago by Travis Cline <travis.cline@…>

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Attached a patch that updates the urlconfs, not sure if there's value in testing .root

comment:2 Changed 7 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [11861]) Fixed #12367 -- Modified test urls to avoid the DeprecationWarning caused by old-style admin inclusions. Thanks to Travis Cline for the patch.

comment:3 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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