#11475: test.Client.session.save() raises error for anonymous users
----------------------------------------+-----------------------------------
          Reporter:  [email protected]  |         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 Govindan <[email protected]>):

 Replying to [comment:6 [email protected]]:
 > Manoj: let's say that you have some view at `/blort` that will store
 something into the session. Then I think you can do this (although I
 haven't tested this code):
 >

 [snip]

 >
 > Does that work for you?
 >
 [[BR]]
 I tested the code. It works like you said: *if* I call a view that saves
 something to the session from within my `setUp`.

 That said, it does not solve my original problem. I don't want to call a
 view in the `setUp` method for this purpose alone.

 [[BR]]
 >
 > So now I know. It's not a bug, really; it's just that Django-under-test
 behaves in a way that makes it error-prone to write unit tests for.
 >
 [[BR]]
 I think it *is* a bug in that the client is not simulating "real world"
 behavior.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11475#comment:7>
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to