Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix template loader monkey patching to also support 1.8
  • Loading branch information
lovelydinosaur committed Jan 23, 2015
commit e988d578535fcc820d30dc7c59f1e24f5c911d3c
6 changes: 6 additions & 0 deletions tests/test_htmlrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ def get_template(template_name, dirs=None):
return Template("example: {{ object }}")
raise TemplateDoesNotExist(template_name)

def select_template(template_name_list, dirs=None, using=None):
if template_name_list == ['example.html']:
return Template("example: {{ object }}")
raise TemplateDoesNotExist(template_name_list[0])

django.template.loader.get_template = get_template
django.template.loader.select_template = select_template

def tearDown(self):
"""
Expand Down