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