Closed
Description
I'm trying out the test client and my tests are exploding because I have signal handlers that listing for user_logged_in()
and attempt to access request.user
. A brief stroll through the Django code for login()
tells me that it won't attach user
to the request unless the attribute is already set.
Given that the test client creates the request without attaching a .user
attribute, this will never work as it is. Could this be fixed by simply adding request.user = None
right after this line?