#7836: django.test.client._session should check for session middleware instead ---------------------------+------------------------------------------------ Reporter: trevor | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: SVN Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------+------------------------------------------------ The django test client class allows you to use `self.client.session` only if you have `'django.contrib.sessions'` in your `INSTALLED_APPS` setting. That is, it assumes you are using sessions if and only if you have the sessions app installed.
This assumption breaks down when you are using the sessions middleware independently of the sessions app, for instance if you are using a cache backend for sessions. I propose that `django.test.client._session` check for the sessions middleware class in `MIDDLEWARE_CLASSES` instead of the sessions app in `INSTALLED_APPS` to make it easier for people using the session middleware independently of the sessions app to use `self.client.sesssion` in tests. -- Ticket URL: <http://code.djangoproject.com/ticket/7836> Django Code <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 -~----------~----~----~----~------~----~------~--~---
