webguy7890
unread,Nov 20, 2009, 2:50:24 PM11/20/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TurboGears
Hi all,
I am currently having a problem with loading farmdev fixtures in my
functional tests. Kumar mentioned that he ran into the problem with
Pylons, and recommend that I use meta.Session.remove() to clear the
session between tests.
In Pylons, they recommend that you do the following in the lib/
base.py:
try:
return WSGIController.__call__(self, environ,
start_response)
finally:
meta.Session.remove()
But in Turbogears, I noticed that DBSession is not initialized within
the init_model method (TG also doesn't use the metadata object). Why
is that? I am curious on what the benefits are for each approach.
Also, how do I clear the session? Many thanks!
Cheers,
Steve