diff options
Diffstat (limited to 'tests/template_tests/syntax_tests/test_numpy.py')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_numpy.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/template_tests/syntax_tests/test_numpy.py b/tests/template_tests/syntax_tests/test_numpy.py index 8425d8ecc0..dd6c01f976 100644 --- a/tests/template_tests/syntax_tests/test_numpy.py +++ b/tests/template_tests/syntax_tests/test_numpy.py @@ -1,10 +1,9 @@ from unittest import skipIf import warnings -from django.conf import settings from django.test import SimpleTestCase -from ..utils import render, setup +from ..utils import setup try: import numpy @@ -28,7 +27,7 @@ class NumpyTests(SimpleTestCase): Numpy's array-index syntax allows a template to access a certain item of a subscriptable object. """ - output = render( + output = self.engine.render_to_string( 'numpy-array-index01', {'var': numpy.array(["first item", "second item"])}, ) @@ -39,11 +38,11 @@ class NumpyTests(SimpleTestCase): """ Fail silently when the array index is out of range. """ - output = render( + output = self.engine.render_to_string( 'numpy-array-index02', {'var': numpy.array(["first item", "second item"])}, ) - if settings.TEMPLATE_STRING_IF_INVALID: + if self.engine.string_if_invalid: self.assertEqual(output, 'INVALID') else: self.assertEqual(output, '') |
