def intercept_renderer(path, context):
 response = render_to_response(path, context)
 response.mako_context = context
 response.mako_template = path
 return response

def intercept_renderer ( path , context ) : response = render_to_response ( path , context ) response . mako_context = context response . mako_template = path return response
intercept calls to render_to_response and attach the context dict to the response for examination in unit tests .