#25699: Allow using test client session handling with custom session apps
-----------------------------------+--------------------
     Reporter:  sergeykolosov      |      Owner:  nobody
         Type:  Uncategorized      |     Status:  new
    Component:  Testing framework  |    Version:  master
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 This ticket follows up #22634 (which allowed extending database-backed
 session backends).

 While it is now possible to reuse session backend classes, it's not the
 case for the corresponding parts of the test client.

 Namely, in case of having the custom session backend and its corresponding
 parts (models, middleware, etc) as a separate application, you're unable
 to use the test client with sessions. The issue is
 `'django.contrib.sessions'` being hardcoded inside of `_session` and
 `login()`.

 Working that around involves monkey-patching the test client with modified
 copies of `_session` and `login()`.

 I suggest refactoring test client for better reusability (given this would
 eliminate session app name being hardcoded).

--
Ticket URL: <https://code.djangoproject.com/ticket/25699>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/056.58a71105ef1d1ce305c1093bdeeb3956%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to