Fix compatibility with tests using context_data (TemplateResponse).