Can the testbrowser handle REQUEST.SESSION?

Rodrigo Bernardo Pimentel rbp at isnomore.net
Sat Oct 20 00:29:35 UTC 2007


Hi!

I have a product with one particular python script that, at a certain  
point, needs to set a value in SESSION. That seems to work fine when I  
try the product  manually, but, when I was writing functional doctests  
for it using the testbrowser, I get an AttributeError saying that  
SESSION doesn't exist. I tried creating a FakeRequestSession on  
app.REQUEST on the doctest but that didn't help.

I could be missing something very obvious or simply doing something  
downright stupid, but I searched around a lot and dug through a bunch  
of code and wasn't able to find out how to set up a session when  
testing via the testbrowser.

I'm creating the test suite with:

FunctionalDocFileSuite(tests_file,  
test_class=PloneTestCase.FunctionalTestCase)

Is this a know testbrowser shortcoming (and, if so, is there a way  
around it?)? Or am I simply doing something wrong?

Thanks!


         rbp
-- 
  http://isnomore.net


----------------------------------------------------------------





More information about the Product-Developers mailing list