Opened 17 months ago

Last modified 16 months ago

#22490 new Bug

get_object within a syndication Feed has no tests

Reported by: danielsamuels 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

Description

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 urls.py, 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 17 months ago by danielsamuels

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.6 to master

comment:2 Changed 17 months ago by danielsamuels

  • Needs tests set

comment:3 Changed 16 months ago by timo

  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Bug

The test may have been inadvertently removed in c4c27d8a04c9125cfbc5c3611557d8e5d3845b0d.

comment:4 Changed 16 months ago by nikl@…

  • Has patch set
  • Needs tests unset
  • Owner changed from nobody to anonymous
  • Status changed from new to assigned
  • Triage Stage changed from Accepted to Ready for checkin

Pull request: https://github.com/django/django/pull/2660

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 16 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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 16 months ago by danielsamuels

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 16 months ago by timo

  • Has patch unset
  • Resolution fixed deleted
  • Status changed from closed to new
  • Triage Stage changed from Ready for checkin to Accepted

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