#28094: Cache settings override does not work properly
---------------------------------------------+------------------------
               Reporter:  R3turnz            |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  Testing framework  |        Version:  1.11
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 The following should override the CACHES setting during tests:
 {{{#!python
 @method_decorator(cache_page(60 * 5), name='dispatch')
 class IndexView(generic.ListView):

 if ENABLE_CACHING:
     CACHES = get_cache()
 else:
     CACHES = {
         'default': {
             'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
         }
     }

 @override_settings(CACHES={'default': {'BACKEND':
 'django.core.cache.backends.dummy.DummyCache'}})
 class IndexViewTests(TestCase):
 }}}
 The setting also seems to be correctly overriden, (django.conf.settings
 contains dummy cache) but I encounter following problems:
 * The context of the response is always None.
 * Test which formerly passed now fail and view functions are not called.
 All problems disappear when I disable caching **manually**!
 This leads me to the assumption that the views are stilled cached.
 The documentation says that overriding the cache should be possible and I
 am not using sessions framwork.
 I do not have enough knowledge of the architecture of django to do further
 debugging.

--
Ticket URL: <https://code.djangoproject.com/ticket/28094>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.364be1c32844c808258c5e1923e57141%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to