#17321: Errors when running messages test with USE_ETAGS = True
----------------------------------+--------------------------
Reporter: etienned | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.messages | Version: 1.3
Severity: Normal | Keywords: etag message
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------
When running the test suite on a barebones Django 1.3.1 install but with
USE_ETAGS set to True, there's 4 errors (mostly all identical) coming from
the contrib.messages test suite. Here's one:
{{{
ERROR: test_with_template_response
(django.contrib.messages.tests.cookie.CookieTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/contrib/messages/tests/base.py", line 195, in
test_with_template_response
response = self.client.post(add_url, data, follow=True)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/test/client.py", line 451, in post
response = self._handle_redirects(response, **extra)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/test/client.py", line 561, in _handle_redirects
response = self.get(path, QueryDict(query), follow=False, **extra)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/test/client.py", line 439, in get
response = super(Client, self).get(path, data=data, **extra)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/test/client.py", line 241, in get
return self.request(**r)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/views/decorators/cache.py", line 80, in _wrapped_view_func
add_never_cache_headers(response)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/utils/cache.py", line 122, in add_never_cache_headers
patch_response_headers(response, cache_timeout=-1)
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/utils/cache.py", line 111, in patch_response_headers
response['ETag'] = '"%s"' %
md5_constructor(response.content).hexdigest()
File "/Users/me/.virtualenvs/test/lib/python2.6/site-
packages/django/template/response.py", line 113, in _get_content
raise ContentNotRenderedError('The response content must be rendered
before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it
can be accessed.
}}}
They are all in "test_with_template_response".
--
Ticket URL: <https://code.djangoproject.com/ticket/17321>
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 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-updates?hl=en.