#25781 closed Cleanup/optimization (fixed)
admin_views tests should mostly use client.force_login()
Reported by: | Tim Graham | Owned by: | Adam |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | awwester@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Some admin_views
tests that aren't testing the login view use something like self.client.post(reverse('admin:login'), self.changeuser_login)
. Since it's not important to test the admin view in these cases, it will be fine to use self.client.force_login(user)
. Some also have unnecessary calls self.client.get(self.index_url)
.
Change History (4)
comment:1 by , 9 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 9 years ago
Note:
See TracTickets
for help on using tickets.
working on topic branch: https://github.com/awwester/django/tree/ticket_25781