Re: Test Layers, not creating users
from
Robert Marianski
on Oct 30, 2006 04:39 PM
> have the site set up to run layers, inheriting my layer from
> remember.base.RememberProfileLayer, which seems to run ok, but non
> of the members listed in that layer are created in portal_memberdata,
> but, i have some content on the site that is supposed to be created
> by the admin users, which this layer does not set up at all. The
> only user that can log in, afaikt is 'test_user_1' which is created
> by the remember ZCMLLayer....
Michael,
The RememberProfileLayer sets up some users, and references are assigned
in the RememberTestBase class (in tests/base.py). If your test class
inherits from RememberTestBase, you can access them like:
self.portal_member
self.blank_member
self.admin_member
It's probably easiest to have your test class inherit from that one, set
your layer to your custom layer, and then add your tests there.
You may want to also take a look at some of the other tests to see how
the members are being used. I believe that most tests make use of the
self.portal_member, whose user id is: "portal_member".
Robert