Opened 10 months ago
Closed 10 months ago
#35265 closed Cleanup/optimization (fixed)
Add test for AdminSite with custom headers.
Reported by: | Kasun Herath | Owned by: | Kasun Herath |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Commit commit introduced attributes to AdminSite
class that can control site header, site title and index title. AdminSite
But the corresponding unit test still checks for the default site titles not for the attributes on the site instance. https://github.com/django/django/blob/main/tests/admin_views/test_adminsite.py#L41
Change History (5)
comment:1 by , 10 months ago
Version: | 5.0 → dev |
---|
comment:2 by , 10 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 10 months ago
Summary: | Adjust unit tests on admin custom site titles → Add test for AdminSite with custom headers. |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
comment:4 by , 10 months ago
Has patch: | set |
---|
Thanks for the quick feedback! Here is a PR with the suggested changes.
Note:
See TracTickets
for help on using tickets.
Thanks for the ticket, there is no need to adjust existing tests, I'd rather add a new one, e.g.
tests/admin_views/test_adminsite.py
UserFor the future, extra test coverage doesn't require a ticket.