#24622: Response "context" and "templates" not available in the Test Client when
using Jinja2 - Django 1.8
-------------------------------------+------------------------------------
     Reporter:  rivantis             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Testing framework    |                  Version:  1.8
     Severity:  Normal               |               Resolution:
     Keywords:  jinja2, test client  |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+------------------------------------

Comment (by phispi):

 Thanks! Maybe it's just me misunderstanding it... What about something
 like
 "This attribute is set to an empty list when not using the
 `django.template.backends.django.DjangoTemplates backend`." for the
 `templates` attribute and "This attribute is set to `None` when not using
 the `django.template.backends.django.DjangoTemplates backend`." for the
 `context` attribute?

 Initially I came across this bug report after spending an evening trying
 to find out why `assertTemplateUsed` does not work as expected (using a
 3rd party template engine). Maybe a warning at
 
https://docs.djangoproject.com/en/1.9/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed
 would be useful as well - especially for people who do not know how Django
 internally gets the information necessary for this test?

--
Ticket URL: <https://code.djangoproject.com/ticket/24622#comment:15>
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 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/066.e192ec207d92a625fe344a7eba300827%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to