Opened 15 years ago

Closed 15 years ago

#9867 closed (wontfix)

Test client login requires sessions framework to be installed

Reported by: David Sauve <dnsauve@…> Owned by: nobody
Component: Testing framework Version: 1.0
Severity: Keywords: testing test client login session
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Perhaps this is obvious, but the documentation really should mention that in order to use the django.test.client login method with the default auth backend, the INSTALLED_APPS must contain django.contrib.sessions.

Also, the return value of True or False for this method doesn't give any indication of why it has failed. Maybe it should raise an exception if sessions is not installed instead of simply returning False?

Change History (6)

comment:1 by David Sauve <dnsauve@…>, 15 years ago

Component: UncategorizedTesting framework
Keywords: testing test client login session added

comment:2 by James Bennett, 15 years ago

I'm kind of wondering what's needed here; we already document what's needed to use django.contrib.auth in general, so shouldn't it be clear that using django.contrib.auth from tests has the same basic requirements?

comment:3 by David Sauve <dnsauve@…>, 15 years ago

It is in retrospect, but at first glance, it might not be so obvious. I think all that would be needed is a brief mention of the requirement.

As for the return values of True/False, they really aren't very informative short of diving into the login source code itself.

comment:4 by James Bennett, 15 years ago

Resolution: wontfix
Status: newclosed

What I worry about is exponentially increasing the documentation: if, every time we mention "and you can use app X", we also mention what's necessary to set up app X instead of relying on people to read app X's documentation, we're goign to spend way too much time duplicating requirements documentation all over the place.

So I'm going to wontfix this; if you believe there's a separate issue with the return value, that should be a separate ticket; multiple issues in one ticket is a no-no.

comment:5 by anonymous, 15 years ago

Resolution: wontfix
Status: closedreopened

comment:6 by Alex Gaynor, 15 years ago

Resolution: wontfix
Status: reopenedclosed

Please don't reopen tickets that have been closed with good reason.

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