On Mon, 29 May 2006 08:14:39 -0000 "pc" <[EMAIL PROTECTED]> wrote:
>
> 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()
Hmmm, that's cool.
Is there any way that we can see the BrowserSession code?
Jason
signature.asc
Description: PGP signature

