Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.2.X] Fixed #13754 - Add a note about a test client session propert…

…y gotcha

Thanks SmileyChris for report and patch.

Backport of [13685] from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 4b4168b commit 17ae1d3262e777c0d3c62e30090050363de5a679 @spookylukey spookylukey committed
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/topics/testing.txt
9 docs/topics/testing.txt
@@ -935,6 +935,15 @@ can access these properties as part of a test condition.
A dictionary-like object containing session information. See the
:doc:`session documentation</topics/http/sessions>` for full details.
+ To modify the session and then save it, it must be stored in a variable
+ first (because a new ``SessionStore`` is created every time this property
+ is accessed)::
+ def test_something(self):
+ session = self.client.session
+ session['somekey'] = 'test'
.. _Cookie module documentation:

0 comments on commit 17ae1d3

Please sign in to comment.
Something went wrong with that request. Please try again.