Ticket #13167: 13167_test.diff

File 13167_test.diff, 1.0 KB (added by kmtracey, 5 years ago)
  • tests/regressiontests/templates/tests.py

    ndex: tests/regressiontests/templates/tests.py
     
    778778            'if-tag-error11': ("{% if 1 == %}yes{% endif %}", {}, template.TemplateSyntaxError),
    779779            'if-tag-error12': ("{% if a not b %}yes{% endif %}", {}, template.TemplateSyntaxError),
    780780
     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
    781787            # Additional, more precise parsing tests are in SmartIfTests
    782788
    783789            ### IFCHANGED TAG #########################################################
Back to Top