Commits

Mikhail Korobov  committed fb80c7a

Test client and imports cleanup

  • Participants
  • Parent commits 5736a31

Comments (0)

Files changed (3)

File django/core/handlers/base.py

 from django.utils.encoding import force_unicode
 from django.utils.importlib import import_module
 from django.utils.log import getLogger
-from django.template.response import bake
 
 logger = getLogger('django.request')
 

File django/test/client.py

 from django.core.signals import got_request_exception
 from django.http import SimpleCookie, HttpRequest, QueryDict
 from django.template import TemplateDoesNotExist
-from django.template.response import bake
 from django.test import signals
 from django.utils.functional import curry
 from django.utils.encoding import smart_str
 
             try:
                 response = self.handler(environ)
-                bake(response)
-
             except TemplateDoesNotExist, e:
                 # If the view raises an exception, Django will attempt to show
                 # the 500.html template. If that template is not available,

File django/test/testcases.py

 from django.http import QueryDict
 from django.test import _doctest as doctest
 from django.test.client import Client
-from django.template.response import bake
 from django.utils import simplejson, unittest as ut2
 from django.utils.encoding import smart_str
 from django.utils.functional import wraps
         if msg_prefix:
             msg_prefix += ": "
 
-        bake(response)
-
         # Put context(s) into a list to simplify processing.
         contexts = to_list(response.context)
         if not contexts:
         if msg_prefix:
             msg_prefix += ": "
 
-        bake(response)
-
         template_names = [t.name for t in response.templates]
         if not template_names:
             self.fail(msg_prefix + "No templates used to render the response")
         if msg_prefix:
             msg_prefix += ": "
 
-        bake(response)
-
         template_names = [t.name for t in response.templates]
         self.failIf(template_name in template_names,
             msg_prefix + "Template '%s' was used unexpectedly in rendering"