Ticket #13754: 13754.diff

File 13754.diff, 792 bytes (added by SmileyChris, 5 years ago)
  • docs/topics/testing.txt

    diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
    index 9b23d54..66029e7 100644
    a b can access these properties as part of a test condition. 
    906906    A dictionary-like object containing session information. See the
    907907    :ref:`session documentation<topics-http-sessions>` for full details.
    908908
     909    To modify the session and then save it, it must be stored in a variable
     910    first (because a new ``SessionStore`` is created every time this property
     911    is accessed)::
     912
     913        def test_something(self):
     914            session = self.client.session
     915            session['somekey'] = 'test'
     916            session.save()
     917
    909918.. _Cookie module documentation: http://docs.python.org/library/cookie.html
    910919
    911920Example
Back to Top