Opened 6 years ago

Closed 6 years ago

#13897 closed (fixed)

There should be tests for object_list's pagination

Reported by: Julien Phalip Owned by:
Component: Generic views Version:
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As discussed on the dev-list (http://groups.google.com/group/django-developers/browse_thread/thread/629df2bddea57b7d) there currently are no tests for the object_list generic view's pagination functionality. The paginator is tested but only on its own.
There should be tests for it as it's probably used in many Django websites.

Attachments (2)

object_list_tests.diff (3.7 KB) - added by Dougal Matthews 6 years ago.
13897.diff (3.5 KB) - added by Chris Beaven 6 years ago.
PEP tidied patch

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by Dougal Matthews

Attachment: object_list_tests.diff added

comment:1 Changed 6 years ago by Dougal Matthews

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

I have attached a patch with tests that cover the different code paths in the object_list view code paths.

comment:2 Changed 6 years ago by Chris Beaven

Owner: changed from nobody to Chris Beaven
Triage Stage: UnreviewedAccepted

Changed 6 years ago by Chris Beaven

Attachment: 13897.diff added

PEP tidied patch

comment:3 Changed 6 years ago by Chris Beaven

Triage Stage: AcceptedReady for checkin
Version: 1.2

comment:4 Changed 6 years ago by Chris Beaven

Owner: Chris Beaven deleted

comment:5 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [13965]) Fixed #13897 -- Added tests for pagination feature of the generic object_list view. Thanks, d0ugal and SmileyChris.

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