[web2py] Re: Unit test and request object

2012-08-06 Thread Mark Li
Was having trouble with this too, thanks for find this! On Friday, April 8, 2011 7:03:21 AM UTC-7, Jérémie wrote: > > Some more points. > > I finally succeeded to reset request thanks to matclab's comments and > code on the slice (http://www.web2pyslices.com/main/slices/take_slice/ > 67) : > >

[web2py] Re: Unit test and request object

2011-04-08 Thread Jérémie
Some more points. I finally succeeded to reset request thanks to matclab's comments and code on the slice (http://www.web2pyslices.com/main/slices/take_slice/ 67) : >> "note that without pickling at init and unpickling at setup, the session and >> request was not cleaned up before each test." cl

[web2py] Re: Unit test and request object

2011-04-07 Thread Jérémie
Sorry for multiposting. Yet, that last solution does not work either. Maybe i am missing something within variable range but having these unit tests working is just a pain in the a... Thanks for any help, Jérémie

[web2py] Re: Unit test and request object

2011-04-07 Thread Jérémie
Answering my own question, here is a workaround i found, instead of setting a new request = Request(), i do clean up session and cache (like admin does). request.vars may be cached in a way or another. Here is the code : In the import part : from gluon.admin import * When you want to reset va