I think you better not disable cache middleware in tests. If tests
fail, so will be in production. I had similar problem, I thought it
was something wrong with tests, but really it was problem in the code.
My site was running well on django built-in server, but not on apache
mod_python.

The problem was in incorrect order of middlewares. Cache middleware
must be after session middleware. Personally I think it is bug django
that causes such behavior. Please post your traceback of the failed
tests.

'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.cache.CacheMiddleware',


Norman Harman wrote:
> Hi,
>
> request.template is None instead of what it should be because the response is 
> from the
> cache middleware.
>
> Which is fine.   My question is there a good way to disable the cache 
> middleware during
> tests?
>
> "good" being atleast the following. is automatic, isn't based of value of 
> DEBUG, doesn't
> require changing django distro.
>
> Is there a special settings file or other file imported during tests only?
>
> thanks,
> njharman


--~--~---------~--~----~------------~-------~--~----~
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