ndex: tests/regressiontests/templates/tests.py
|
|
|
778 | 778 | 'if-tag-error11': ("{% if 1 == %}yes{% endif %}", {}, template.TemplateSyntaxError), |
779 | 779 | 'if-tag-error12': ("{% if a not b %}yes{% endif %}", {}, template.TemplateSyntaxError), |
780 | 780 | |
| 781 | # Non-existent args |
| 782 | 'if-tag-badarg01':("{% if x|default_if_none:y %}yes{% endif %}", {}, ''), |
| 783 | 'if-tag-badarg02':("{% if x|default_if_none:y %}yes{% endif %}", {'y': 0}, ''), |
| 784 | 'if-tag-badarg03':("{% if x|default_if_none:y %}yes{% endif %}", {'y': 1}, 'yes'), |
| 785 | 'if-tag-badarg04':("{% if x|default_if_none:y %}yes{% else %}no{% endif %}", {}, 'no'), |
| 786 | |
781 | 787 | # Additional, more precise parsing tests are in SmartIfTests |
782 | 788 | |
783 | 789 | ### IFCHANGED TAG ######################################################### |