﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34327	Test client session does not work as described when using signed cookie engine	Sergei	nobody	"The following snippet from [https://docs.djangoproject.com/en/dev/topics/testing/tools/#django.test.Client.session the documentation] does not work when using `django.contrib.sessions.backends.signed_cookies`:

{{{
#!python
def test_something(self):
    session = self.client.session
    session['somekey'] = 'test'
    session.save()
}}}

`session.save()` is not enough in this case: session key is session data itself and test client cookies need to be updated.
Like `session` getter does when creating session store object (`django/test/client.py:732`):

{{{
#!python
self.cookies[settings.SESSION_COOKIE_NAME] = session.session_key
}}}"	Bug	closed	Testing framework	dev	Normal	wontfix	session signed_cookies		Unreviewed	0	0	0	0	0	0
