Your patch (and idea) is interesting but it addresses the problem on a different, higher level.
The goal of my patch is to be able to test code that refers to identity.current variable. As it is now, the code under test that tries to access identity.current fails with IdentityNotEnabled exception and there is no easy way for a user to 'enable' it. That's the shortcoming my patch addresses.
Max.
On 11/1/06,
thesamet <[EMAIL PROTECTED]> wrote:
Have you looked at the patch I submitted at
http://trac.turbogears.org/turbogears/ticket/930 ?
The main difference is that the identity lives inside a BrowserSession
object (as a cookie) and is not global. Therefore you can have several
"browsers" interacting with the application. It's very useful when you
want to test if user A is affected from user B's actions. BTW,
BrowserSession tracks all cookies, and not just the visit cookie, so
it's useful for many other tests.
The con in BrowserSession is that you actually have to browse to /login
in order to link the session with an identity. But this can be remedied
by adding something similar to attach_identity to the BrowserSession.
What do you think?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---
