2014-12-03 20:36:17 +00:00
|
|
|
from django.test import SimpleTestCase
|
2014-11-12 01:32:44 +00:00
|
|
|
|
2014-12-07 08:43:10 +00:00
|
|
|
from ..utils import setup
|
2014-11-12 01:32:44 +00:00
|
|
|
|
|
|
|
|
2014-12-03 20:36:17 +00:00
|
|
|
class BuiltinsTests(SimpleTestCase):
|
2014-11-12 01:32:44 +00:00
|
|
|
|
|
|
|
@setup({'builtins01': '{{ True }}'})
|
|
|
|
def test_builtins01(self):
|
2014-12-07 08:43:10 +00:00
|
|
|
output = self.engine.render_to_string('builtins01')
|
|
|
|
self.assertEqual(output, 'True')
|
2014-11-12 01:32:44 +00:00
|
|
|
|
|
|
|
@setup({'builtins02': '{{ False }}'})
|
|
|
|
def test_builtins02(self):
|
2014-12-07 08:43:10 +00:00
|
|
|
output = self.engine.render_to_string('builtins02')
|
|
|
|
self.assertEqual(output, 'False')
|
2014-11-12 01:32:44 +00:00
|
|
|
|
|
|
|
@setup({'builtins03': '{{ None }}'})
|
|
|
|
def test_builtins03(self):
|
2014-12-07 08:43:10 +00:00
|
|
|
output = self.engine.render_to_string('builtins03')
|
|
|
|
self.assertEqual(output, 'None')
|