summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-10-31 11:38:53 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-10-31 11:38:53 +0100
commitc0c1bb9e64d7e1cea50dc4818ffcf229b568578b (patch)
tree8eb0c20045034a8cc99a3ab90d199261e6082401 /tests/staticfiles_tests
parentf2ddc439b1938acb6cae693bda9d8cf83a4583be (diff)
Avoided using private API get_template_from_string.
Diffstat (limited to 'tests/staticfiles_tests')
-rw-r--r--tests/staticfiles_tests/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py
index 67afd25351..5dc630f004 100644
--- a/tests/staticfiles_tests/tests.py
+++ b/tests/staticfiles_tests/tests.py
@@ -8,7 +8,7 @@ import shutil
import sys
import unittest
-from django.template import loader, Context
+from django.template import Context, Template
from django.conf import settings
from django.core.cache.backends.base import BaseCache
from django.core.exceptions import ImproperlyConfigured
@@ -97,7 +97,7 @@ class BaseStaticFilesTestCase(object):
def render_template(self, template, **kwargs):
if isinstance(template, six.string_types):
- template = loader.get_template_from_string(template)
+ template = Template(template)
return template.render(Context(kwargs)).strip()
def static_template_snippet(self, path, asvar=False):