Jason,
I faced the same problem on my project few days ago. Eventually, I
came up with a super simple class called BrowserSession, which
basically calls create_request(), but keeps track of the cookies.
Then, inside my test methods I have something like:

session = BrowserSession()
session.goto('/login?username=x&password=y')
session.goto('/for/members/only')

This approach made the testing code much more readable. In my
application
users can interact -  one test case can have two BrowserSessions that
play together. This makes it clear what each user is doing:

user1.goto('/edit?page=mypage')
user2.goto('/delete?page=mypage)
assert 'Page is locked' in user2.get_response()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to