Test client login return values should be improved
|Reported by:||David Sauve <dnsauve@…>||Owned by:||nobody|
|Severity:||Keywords:||testing test client login session|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The current implementation of the django.test.client's login method returns either True or False when trying to login a user, however, there is no way of knowing why a login failed.
The login method could probably be modified to raise an exception with further information regarding why the login failed. For example, if INSTALLED_APPS does not include 'settings'.
Change History (4)
comment:1 Changed 6 years ago by David Sauve <dnsauve@…>
- Component changed from Uncategorized to Testing framework
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 6 years ago by ericholscher
- Resolution set to wontfix
- Status changed from new to closed