From 92a2d049a253fb499db88efb6cf6c9209f6f251c Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 7 Dec 2014 09:43:10 +0100 Subject: Isolated template tests from Django settings. --- tests/template_tests/syntax_tests/test_numpy.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/template_tests/syntax_tests/test_numpy.py') 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, '') -- cgit v1.3