Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2011-03-10 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
+-
   Reporter:  baumer1122|Owner:  PaulM
 Status:  closed|Milestone:
  Component:  Cache system  |  Version:  1.2
 Resolution:  duplicate | Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+-
Changes (by russellm):

 * status:  assigned => closed
 * resolution:   => duplicate


Comment:

 Closing as a duplicate of #15142; This ticket came first, but the other
 ticket has a more complete analysis and a proposed patch.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2011-02-27 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
+---
   Reporter:  baumer1122| Owner:  PaulM
 Status:  assigned  | Milestone:   
  Component:  Cache system  |   Version:  1.2  
 Resolution:|  Keywords:   
   Triage Stage:  Accepted  | Has patch:  0
Needs documentation:  0 |   Needs tests:  0
Patch needs improvement:  0 |  
+---
Changes (by julien):

  * component:  Contrib apps => Cache system


Comment:

 This is primarily a cache-related issue.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-12-22 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by christandiono):

 * cc: christandi...@tbp.berkeley.edu (added)

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-10-14 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by christandiono):

 Replying to [comment:4 toofishes]:
 >  * Always set CACHE_BACKEND to 'dummy://' when running tests- sucks if
 you actually want to test caching concerns like making sure different
 views go to different users even with caching enabled.
 >  * Set CACHE_BACKEND to 'dummy://' in supplied tests when we know we
 want to examine context or templates in the response.

 By the way, these don't seem to work, bizarrely enough. Our cache backend
 has long been set to dummy because we've been too lazy to set it up,
 although the two middlewares were still there (and causing tests to fail).

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-10-11 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by PaulM):

 I opened #14446 with a patch to fix the single failure, since it seems to
 be a separate issue from the major reason this ticket is open.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-08-28 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by toofishes):

 This bug comes down to the following line in client.py:224:

 {{{
 signals.template_rendered.connect(on_template_render, dispatch_uid
 ="template-render")
 }}}

 The problem occurs when a view is rendered any subsequent time in the test
 run- we will never render any templates, causing our signal that attempts
 to trap template and context items to never fire, which in turn leads to
 context and template attributes on HttpResponse being left empty/undefined
 even though the response content itself and the status_code end up being
 correct.

 I'm not sure of the solution here; they all seem ugly:

  * Always set CACHE_BACKEND to 'dummy://' when running tests- sucks if you
 actually want to test caching concerns like making sure different views go
 to different users even with caching enabled.
  * Set CACHE_BACKEND to 'dummy://' in supplied tests when we know we want
 to examine context or templates in the response.
  * Remove cache middleware explicitly from settings.MIDDLEWARE_CLASSES in
 these tests.
  * Call cache.clear() in test setup/teardown- seems like overkill and is
 potentially non-safe it people aren't careful about their setup.
  * Attempt to set template and context before the response ends up being
 cached, so when we later retrieve it we get the same results as the first
 non-cached run.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-08-16 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by PaulM):

 Further investigation suggests that it's not a problem with the order of
 the middleware classes.

 The final failure on the test run seems to be caused by
 `django.contrib.auth.views.password_reset_confirm()` not being properly
 decorated with @never_cache.

 I'm still investigating the `response.context` issue, but I believe that
 the cache is bypassing part of the test runner.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-08-15 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by PaulM):

 This seems related to the fact that some of the auth tests add
 `django.contrib.auth.midddleware.RemoteUserMiddleware` to the end of
 `settings.MIDDLEWARE_CLASSES`, breaking the requirement that
 `FetchFromCacheMiddleware` be last. Working on a patch now.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14105: django.contrib.auth tests failing with cache middleware

2010-08-15 Thread Django
#14105: django.contrib.auth tests failing with cache middleware
---+
  Reporter:  baumer1122| Owner:  PaulM
Status:  assigned  | Milestone:   
 Component:  Contrib apps  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by PaulM):

  * status:  new => assigned
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * owner:  nobody => PaulM
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted

Comment:

 I can duplicate this problem on trunk.

 The test failures all seem to point to `response.context` being returned
 as `None`.

 The failures are generally of this form:

 {{{
 ==
 ERROR: test_last_login
 (django.contrib.auth.tests.remote_user.RemoteUserCustomTest)
 --
 Traceback (most recent call last):
   File "/opt/django/contrib/auth/tests/remote_user.py", line 87, in
 test_last_login
 self.assertNotEqual(default_login,
 response.context['user'].last_login)
 TypeError: 'NoneType' object is unsubscriptable

 }}}

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.