12 messages in com.googlegroups.pylons-discussRe: Testing with the session object| From | Sent On | Attachments |
|---|---|---|
| Marin | 27 Jun 2008 06:33 | |
| Shannon -jj Behrens | 28 Jun 2008 04:17 | |
| Marin | 28 Jun 2008 05:06 | |
| Jonathan Vanasco | 28 Jun 2008 07:19 | |
| Mike Orr | 28 Jun 2008 10:53 | |
| Wichert Akkerman | 28 Jun 2008 11:00 | |
| Marin | 29 Jun 2008 03:09 | |
| Marin | 29 Jun 2008 03:20 | |
| Wichert Akkerman | 29 Jun 2008 08:16 | |
| Marin | 30 Jun 2008 04:34 | |
| Marin | 30 Jun 2008 05:23 | |
| Jonathan Vanasco | 07 Jul 2008 12:25 |
| Subject: | Re: Testing with the session object![]() |
|---|---|
| From: | Marin (mari...@gmail.com) |
| Date: | 06/30/2008 04:34:04 AM |
| List: | com.googlegroups.pylons-discuss |
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 pylo...@googlegroups.com
To unsubscribe from this group, send email to
pylo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---




