Opened 12 years ago
Closed 5 years ago
#22490 closed Cleanup/optimization (fixed)
get_object within a syndication Feed has no tests
| Reported by: | Daniel Finch | 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 , 12 years ago
| Version: | 1.6 → master |
|---|
comment:2 by , 12 years ago
| Needs tests: | set |
|---|
comment:3 by , 12 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|---|
| Type: | Uncategorized → Bug |
comment:4 by , 11 years ago
| Has patch: | set |
|---|---|
| Needs tests: | unset |
| Owner: | changed from to |
| Status: | new → assigned |
| Triage Stage: | Accepted → 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 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:6 by , 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 , 11 years ago
| Has patch: | unset |
|---|---|
| Resolution: | fixed |
| Status: | closed → new |
| Triage Stage: | Ready for checkin → 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.
comment:8 by , 5 years ago
| Easy pickings: | set |
|---|
comment:9 by , 5 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:10 by , 5 years ago
| Has patch: | set |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
| Type: | Bug → Cleanup/optimization |
The test may have been inadvertently removed in c4c27d8a04c9125cfbc5c3611557d8e5d3845b0d.