[Zope-dev] create user object for testing purposes (ZUnit)

Karim Yaici karimy@nipltd.com
Fri, 27 Apr 2001 10:27:05 +0100


Hi,
I need some help on the creation of a (dummy?) user object using Python.  I
am trying to test a zope product using ZUnit. I have been able to 'simulate'
a request by using the makerequest.py module (Lib/Python/Testing). Here is
how I used it:

import makerequest
app = makerequest.makerequest(Zope.app())
request = app.REQUEST

Now, the REQUEST object does not contain any AUTHENTICATED_USER, and this
causes me problem because my product is using the user object, in other
words, the product can not be fully tested.

So, is it possible create (or simulated) an AUTHENTICATED_USER in the
REQUEST? if it is, then I'll like to know how.

Thank for your time and help

Cheers,

Karim