#11475: test.Client.session.save() raises error for anonymous users
-----------------------------------+--------------------------------------
Reporter: egmanoj@… | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.1-beta-1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by hongshuning):
I think kragen is right. The web server will not create any session object
unless a client try to visit a web page. In the origin test case's setUp()
method, the client does not visit any web page, so no session object
created by django. At that time, {{{self.client.session["key"]}}} is
nonsense. So, if you want to use the session object, you must visit a web
page at first, just like a login access or any others.
--
Ticket URL: <https://code.djangoproject.com/ticket/11475#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.