#34327: Test client session does not work as described when using signed cookie
engine
-------------------------------------+-------------------------------------
     Reporter:  Sergei               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Testing framework    |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  session              |             Triage Stage:
  signed_cookies                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Sergei):

 Also, can I fix this and do a PR?

 I think it's possible to make a test client API like this:

 {{{
 #!python

 # introduce setter for session
 # short-circuit if passing SessionBase type
 client.session = session_store

 # if not SessionBase, then assume it's a map type -> .items()
 # completely replace session data
 client.session = {'foo': 'bar'}

 # update
 session = client.session
 session.update({'foo': 'bar'})
 client.session = session
 }}}

 Old way from the docs would continue to work (if not signed cookies
 store).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34327#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018637568835-d5c26b5b-7627-4b7c-bf67-6e8380233b5b-000000%40eu-central-1.amazonses.com.

Reply via email to