Re: Logout with TestClient

2007-08-17 Thread Russell Keith-Magee
On 8/17/07, eXt <[EMAIL PROTECTED]> wrote: > > Thanks for valuable hints. I submitted a ticket with a patch: > http://code.djangoproject.com/ticket/5189. Fantastic! I've just committed this as [5916]. Thanks for your work on this. Yours, Russ Magee %-) --~--~-~--~~~

Re: Logout with TestClient

2007-08-17 Thread eXt
Thanks for valuable hints. I submitted a ticket with a patch: http://code.djangoproject.com/ticket/5189. Jakub Wiśniowski On 16 Sie, 16:55, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 8/16/07, eXt <[EMAIL PROTECTED]> wrote: > > > > > Ok, I've got a logout method that should (IMHO) be a

Re: Logout with TestClient

2007-08-16 Thread oggie rob
If the purpose is to check for permissions/different display with logged in vs. anonymous clients/etc, why not eliminate the chance of a failure in the logout method and just create a new Client? Gives more flexibility (by calling the client you want) and keeps things simple. I use a method to tes

Re: Logout with TestClient

2007-08-16 Thread Russell Keith-Magee
On 8/16/07, eXt <[EMAIL PROTECTED]> wrote: > > Ok, I've got a logout method that should (IMHO) be added to client.py. > I can generate patch from it. But what form should have a test and a > documentation? * Test: add a test case to /tests/modeltests/test_client that validates that logout works.

Re: Logout with TestClient

2007-08-16 Thread eXt
On 16 Sie, 01:52, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: (...) > No, there isn't a logout method. However, if there were to be one, > resetting the cookie is about all it would need to do. Deleting the > old session would be another possible action, although it isn't > absolutely require

Re: Logout with TestClient

2007-08-15 Thread Russell Keith-Magee
On 8/16/07, eXt <[EMAIL PROTECTED]> wrote: > > Hi! > >TestClient has a login function (which is very useful :)), but > doesn't have a logout one. After browsing throught the code I > discovered that I can log a user out with a very simple call: > c.cookies = SimpleCookie(). Is this a proper wa

Logout with TestClient

2007-08-15 Thread eXt
Hi! TestClient has a login function (which is very useful :)), but doesn't have a logout one. After browsing throught the code I discovered that I can log a user out with a very simple call: c.cookies = SimpleCookie(). Is this a proper way of logging out or did I miss something? regards -- J