#11475: test.Client.session.save() raises error for anonymous users ----------------------------------------+----------------------------------- Reporter: egma...@gmail.com | Owner: nobody Status: new | Milestone: Component: Testing framework | Version: 1.1-beta-1 Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ----------------------------------------+----------------------------------- Comment (by Manoj Govidnan <egma...@gmail.com>):
> > 5. But you can't just say `self.client.session['foo'] = 'bar'; self.client.session.save()` because, as explained in my previous two comments, you get a separate session object for each time you say `self.client.session`. Instead you have to say `s = self.client.session; s['foo'] = 'bar'; s.save()`, and then everything will work. > [[BR]] Can you please point where these changes should be made in the context of the sample test case given above? I tested after making the changes you suggested inside the `setUp()` method as well as the `test_foo()` method and it still did not work. -- Ticket URL: <http://code.djangoproject.com/ticket/11475#comment:5> Django <http://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 django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---