[Zope] Zope unit testing - users?

Paul Winkler pw_lists@slinkp.com
Fri, 27 Jun 2003 12:29:14 -0400


On Fri, Jun 27, 2003 at 03:21:48PM +1000, Richard Jones wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Is there any way to change the current user in Zope unit tests? I've 
> managed to trace the current user down to 
> SecurityManager._context.user, but reassigning that doesn't seem to 
> make the change. Any hints?

I haven't tried it in unit tests, but the technique i use in debugging
sessions should work:
http://www.zopelabs.com/cookbook/1046449715

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's OCTO FLASH STRANGE!
(random hero from isometric.spaceninja.com)