diff options
| author | Tom Christie | 2015-01-23 11:47:01 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-01-23 11:47:01 +0000 | 
| commit | e988d578535fcc820d30dc7c59f1e24f5c911d3c (patch) | |
| tree | 92f75aa27d03172661339af787786e201ccbb5fd /tests | |
| parent | e307fd289c52a9bb97a567cff314a479bbdd21df (diff) | |
| download | django-rest-framework-e988d578535fcc820d30dc7c59f1e24f5c911d3c.tar.bz2 | |
Fix template loader monkey patching to also support 1.8
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_htmlrenderer.py | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/tests/test_htmlrenderer.py b/tests/test_htmlrenderer.py index 2edc6b4b..a33b832f 100644 --- a/tests/test_htmlrenderer.py +++ b/tests/test_htmlrenderer.py @@ -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):          """ | 
