Re: [Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-16 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  logout test  | Triage Stage:
  AUTH_USER_MODEL|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"183e9d20294dec28df8ae5ea8ed7acc712adcd2b"]:
 {{{
 #!CommitTicketReference repository=""
 revision="183e9d20294dec28df8ae5ea8ed7acc712adcd2b"
 [1.7.x] Fixed #22771 -- Fixed test.Client.logout when using custom auth
 backend.

 Backport of 50b9313e0a from master
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.8602ed67415181e2335500a62ab60961%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-16 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  logout test  | Triage Stage:
  AUTH_USER_MODEL|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by xafer):

 Thanks for the quick fix !
 Any chance this could make it into 1.7 ?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.650e916d27fd93a7ad1a5fe8f1245de9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-13 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  logout test  | Triage Stage:
  AUTH_USER_MODEL|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"50b9313e0a0739dfe1ac699449b66ed3e62add51"]:
 {{{
 #!CommitTicketReference repository=""
 revision="50b9313e0a0739dfe1ac699449b66ed3e62add51"
 Fixed #22771 -- Fixed test.Client.logout when using custom auth backend.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.a98e94348d4a5e5606579e376392ddfa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-10 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:
 Keywords:  logout test  | Triage Stage:
  AUTH_USER_MODEL|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by xafer):

 cf https://github.com/django/django/pull/2769

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.1f22f560ae0f361c297e66385a4f6e8d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-06 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:
 Keywords:  logout test  | Triage Stage:
  AUTH_USER_MODEL|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by xafer):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.66c37633e28217eea53ad26846f3e303%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-06 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:
 Keywords:  logout test  | Triage Stage:
  AUTH_USER_MODEL|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by xafer):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 To backup the change, using django.contrib.auth.get_user is also what's
 done by the AuthenticationMiddleware (cf
 
https://github.com/django/django/blob/1.6.5/django/contrib/auth/middleware.py#L18)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.5ac3971e85fd52660237181c8a9d7c43%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #22771: TestCase.client.logout fails when using custom authentication backend not based on AUTH_USER_MODEL

2014-06-05 Thread Django
#22771: TestCase.client.logout fails when using custom authentication backend 
not
based on AUTH_USER_MODEL
-+-
 Reporter:  xafer|  Owner:  nobody
 Type:  Uncategorized| Status:  new
Component:  Testing  |Version:  1.6
  framework  |   Keywords:  logout test AUTH_USER_MODEL
 Severity:  Normal   |  Has patch:  0
 Triage Stage:  Unreviewed   |  UI/UX:  0
Easy pickings:  0|
-+-
 Hello !

 I'm not sure if it's a bug or a new feature:

 TestCase.client.login calls django.contrib.auth.login(request, user)
 which stores the user id and its backend in the request's session:
 request.session[SESSION_KEY] = user.pk
 request.session[BACKEND_SESSION_KEY] = user.backend

 But in TestCase.client.logout calls, Django tries to get the authenticated
 user with:
 uid = self.session.get(SESSION_KEY)
 request.user = UserModel._default_manager.get(pk=uid)

 assuming user is a AUTH_USER_MODEL and without checking its
 BACKEND_SESSION_KEY...

 It would seem cleaner to actually rly on django.contrib.auth.get_user to
 find the correct user (whatever its type) and allow the concurrent use of
 multiple user models (typically user model and customer model...).

 See https://github.com/xavfernandez/django_test_client_bugreport for a
 failing example.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.1d8b674ce5a5108061db4ec140cb97c8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.