On Fri, Nov 21, 2008 at 1:15 AM, Randy Syring <[EMAIL PROTECTED]> wrote:
>
> I would like to be able to test my web applications from the
> perspective of an actual user. Are there any tools that would let me
> do something like:
>
> c = Client(myapp)
> r = c.get(/user/login)
> r.checkfor('User Login')
> r.checkfor('enter credentials')
> r.set('username', 'foo')
> r.set('password', 'bar')
> r2 = c.submit(r)
> r2.checkfor('login succesful')
> r = c.get(/uploadfile) # at this point, the user's session from the
> above login would be in effect
> r = c.setfile('toupload', open('myfile.txt'))
> r2 = c.submit(r)
> r2.checkfor('file uploaded')
> etc.
It looks like you are reinventing AuthKit :-) That's OK.
Just in case you might find my authform-middleware usefull. It
contains some unit-tests too (if you will not use middleware
unit-tests might help):
http://hg.sandbox.lt/authform-middleware/file/36d42b4219bf/tests/test.py
You can check authorize-middleware as well:
http://hg.sandbox.lt/authorize-middleware/
I need to document those middlewares...
--
Dalius
http://blog.sandbox.lt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---