mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 11:04:02 +03:00
Fix template loader monkey patching to also support 1.8
This commit is contained in:
parent
e307fd289c
commit
e988d57853
|
@ -56,7 +56,13 @@ class TemplateHTMLRendererTests(TestCase):
|
|||
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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user