mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #23768 -- Rewrote template tests as unit tests.
This commit is contained in:
committed by
Tim Graham
parent
4a4ad27712
commit
b872134bfc
18
tests/template_tests/syntax_tests/test_builtins.py
Normal file
18
tests/template_tests/syntax_tests/test_builtins.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from .utils import render, setup
|
||||
|
||||
|
||||
class BuiltinsTests(TestCase):
|
||||
|
||||
@setup({'builtins01': '{{ True }}'})
|
||||
def test_builtins01(self):
|
||||
self.assertEqual(render('builtins01'), 'True')
|
||||
|
||||
@setup({'builtins02': '{{ False }}'})
|
||||
def test_builtins02(self):
|
||||
self.assertEqual(render('builtins02'), 'False')
|
||||
|
||||
@setup({'builtins03': '{{ None }}'})
|
||||
def test_builtins03(self):
|
||||
self.assertEqual(render('builtins03'), 'None')
|
||||
Reference in New Issue
Block a user