1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fix broken tests due to changes in r15591 by updating the test store_rendered_templates signal handler.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Chris Beaven
2011-02-21 10:12:23 +00:00
parent 01c42cbb99
commit 4419f5fc00
2 changed files with 30 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import os
import re
import mimetypes
import warnings
from copy import copy
try:
from cStringIO import StringIO
except ImportError:
@@ -91,9 +92,12 @@ class ClientHandler(BaseHandler):
def store_rendered_templates(store, signal, sender, template, context, **kwargs):
"""
Stores templates and contexts that are rendered.
The context is copied so that it is an accurate representation at the time
of rendering.
"""
store.setdefault('templates', []).append(template)
store.setdefault('context', ContextList()).append(context)
store.setdefault('context', ContextList()).append(copy(context))
def encode_multipart(boundary, data):
"""