Add tests for _is_jinja_tag and _is_block_tag routines.
This commit is contained in:
parent
65a46efbbe
commit
59fa3617c3
1 changed files with 10 additions and 0 deletions
|
|
@ -63,6 +63,16 @@ class RenderTestCase(TestCase):
|
|||
for test, expect in test_samples.items():
|
||||
assert self.engine._encode_escape_chars(test) == expect
|
||||
|
||||
|
||||
def _test_is_jinja_tag(self):
|
||||
assert self._is_jinja_tag('{{ foo }}')==True
|
||||
assert self._is_jinja_tag('{ foo }')==False
|
||||
|
||||
def _test_is_block_tag(self):
|
||||
assert self._is_block_tag('{% if True %}')==True
|
||||
assert self._is_block_tag('{{ foo }}')==False
|
||||
assert self._is_block_tag('{ foo }')==False
|
||||
|
||||
def test_create_test_node(self):
|
||||
assert self.engine.create_text_node(self.document, 'text').toxml() == 'text'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue