On 5/30/07, Almad <[EMAIL PROTECTED]> wrote:
>
> On May 29, 6:46 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote:
> > You might take a look at twill (http://twill.idyll.org/) - Although I
> > find it a tad trickier to get rolling with than Selenium, it has the
> > functionality that you want (emulating a browser, including cookies)
> > and can be 'programmed' to walk to an OpenID login site and back again
> > following redirects. You can think of it as a more complex/complete
> > version of the test client in Django.
>
> I knew, but also django client is much faster :-)

There are also a lot of things the Django test client can't do.
Anything relying upon client-side javascript, for example.

Like the docs say, it's not intended as the perfect ultimate test
client - just as a way of doing simple view testing.

> And, sorry for disturbing, I thought that client really fills form &
> co. However, I just passed openid_url instead of identity_url to
> login() function and thus login failed.
> I can just use login() to pass it to my openid backend and then I'm
> logged in without need to go through openid verification process.

Until recently, login() did fill in a form - but it was a very
specific form (the form from django.contrib.auth.views).

In [5152] (post 0.96 release), this was replaced with a scheme that
avoids forms entirely. The test client now uses the authentication
credentials directly to set up a session, set a session cookie, etc.
This simulates the effect of logging in without actually visiting a
specific login view.

Without knowing the specifics of your setup, if you have OpenID set up
as an django.contrib.auth backend, you should be able to provide the
OpenID credentials to the test client login method, which will log in
the test client session.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to