Opened 6 years ago

Last modified 6 years ago

#22490 new Bug

get_object within a syndication Feed has no tests

Reported by: Daniel Samuels Owned by: anonymous
Component: contrib.syndication Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Within django.tests.syndication_tests.feeds there is a class named ComplexFeed which extends views.Feed and overrides the get_object() method, however this class is not used in any tests. There is a reference to the class in the related, but again this is unused. This means that there is currently no test code written for the get_object() method in django.contrib.syndication.views.Feed and no examples for developers to follow when writing their own tests.

Change History (7)

comment:1 Changed 6 years ago by Daniel Samuels

Version: 1.6master

comment:2 Changed 6 years ago by Daniel Samuels

Needs tests: set

comment:3 Changed 6 years ago by Tim Graham

Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

The test may have been inadvertently removed in c4c27d8a04c9125cfbc5c3611557d8e5d3845b0d.

comment:4 Changed 6 years ago by nikl@…

Has patch: set
Needs tests: unset
Owner: changed from nobody to anonymous
Status: newassigned
Triage Stage: AcceptedReady for checkin

Pull request:

The class was previously used to test complex feed structures implemented in the function-based syndication - which now is covered by url dispatching.

comment:5 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 1ab278f39d9bec7d23adcd459c0028b176d073d4:

Fixed #22490 -- removed obsolete ComplexFeed class from syndication_tests

It was previously used in a test that was deprecated and then removed, this cruft can be removed now.

comment:6 Changed 6 years ago by Daniel Samuels

With this change, does this mean that functions such as get_object have no tests at all? This isn't the outcome I was expecting from this ticket.

comment:7 Changed 6 years ago by Tim Graham

Has patch: unset
Resolution: fixed
Status: closednew
Triage Stage: Ready for checkinAccepted

Yes, I cannot find a test for this function. The default returns None, but there should probably be one that returns an actual object.

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