Re: [Zope3-Users] Doctests and authenticated principal

2007-03-08 Thread Stephan Richter
On Wednesday 31 January 2007 05:28, Maciej Wisniowski wrote: In doc test I may use: request = TestRequest() class User(object): ...     id = 'Jan' ...     title = 'Jan Kowalski' request.setPrincipal(User()) ..rest of the test.. and after this everything works. Is this

[Zope3-Users] Doctests and authenticated principal

2007-01-31 Thread Maciej Wisniowski
Hi I'm writing doctest using DocFileSuite. Code that I'm testing needs information about currently authenticated principal. It uses: request.principal.id to get it. In doc test I may use: request = TestRequest() class User(object): ... id = 'Jan' ... title = 'Jan Kowalski'