I discovered why this code that was given in
http://groups.google.com/group/pylons-discuss/browse_thread/thread/ec52fe65b960567/12b36231ff4dfb97?hl=en&lnk=gst&q=unit#12b36231ff4dfb97
does not work.
def test_session(self):
import pylons
pylons.session._push_object({'user':'user_id'})
response = self.app.get(url_for('/'))
pylons.session._pop_object()
This code puts the dictionary on the session stack, but then another
object is pushed on the stack in pylons/wsgiapp.py:146 from the
environ['pylons.environ_config']['session']
If you do a session._pop_object() in you controller you pop out the
empty session and get your session on the top of the stack. It works,
but I still want to find a cleaner way of doing it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---