Can the testbrowser handle REQUEST.SESSION?

Andreas Jung lists at zopyx.com
Sat Oct 20 03:36:30 UTC 2007



--On 19. Oktober 2007 22:29:35 -0200 Rodrigo Bernardo Pimentel 
<rbp at isnomore.net> wrote:

> 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.
>

At least in ZopeTestCase you have to call setupCoreSessions() within your
afterSetUp() method..check the spelling for the ZTC docs.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20071020/2f846cd9/attachment.asc>


More information about the Product-Developers mailing list