Opened 11 years ago

Closed 4 years ago

#22490 closed Cleanup/optimization (fixed)

get_object within a syndication Feed has no tests

Reported by: Daniel Samuels Owned by: Octavio Peri
Component: contrib.syndication Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes 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 (11)

comment:1 by Daniel Samuels, 11 years ago

Version: 1.6master

comment:2 by Daniel Samuels, 11 years ago

Needs tests: set

comment:3 by Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

The test may have been inadvertently removed in c4c27d8a04c9125cfbc5c3611557d8e5d3845b0d.

comment:4 by nikl@…, 11 years ago

Has patch: set
Needs tests: unset
Owner: changed from nobody to anonymous
Status: newassigned
Triage Stage: AcceptedReady 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 by Tim Graham <timograham@…>, 11 years ago

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 by Daniel Samuels, 11 years ago

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 by Tim Graham, 11 years ago

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.

comment:8 by Mariusz Felisiak, 4 years ago

Easy pickings: set

comment:9 by Octavio Peri, 4 years ago

Owner: changed from anonymous to Octavio Peri
Status: newassigned

comment:10 by Mariusz Felisiak, 4 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin
Type: BugCleanup/optimization

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 746bb13:

Fixed #22490 -- Added tests for Feed.get_object().

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