Fix template loader monkey patching to also support 1.8

This commit is contained in:
Tom Christie 2015-01-23 11:47:01 +00:00
parent e307fd289c
commit e988d57853

View File

@ -56,7 +56,13 @@ class TemplateHTMLRendererTests(TestCase):
return Template("example: {{ object }}") return Template("example: {{ object }}")
raise TemplateDoesNotExist(template_name) 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.get_template = get_template
django.template.loader.select_template = select_template
def tearDown(self): def tearDown(self):
""" """