Code

Ticket #4897: test_fix-template_tag_if_invalid.patch

File test_fix-template_tag_if_invalid.patch, 777 bytes (added by korpios, 7 years ago)
  • tests/regressiontests/templates/tests.py

    diff -r a7ffd11bb9d2 tests/regressiontests/templates/tests.py
    a b class Templates(unittest.TestCase): 
    602602            # translation of a constant string 
    603603            'i18n13': ('{{ _("Page not found") }}', {'LANGUAGE_CODE': 'de'}, 'Seite nicht gefunden'), 
    604604 
    605             ### HANDLING OF TEMPLATE_TAG_IF_INVALID ################################### 
     605            ### HANDLING OF TEMPLATE_STRING_IF_INVALID ################################### 
    606606 
    607607            'invalidstr01': ('{{ var|default:"Foo" }}', {}, ('Foo','INVALID')), 
    608608            'invalidstr02': ('{{ var|default_if_none:"Foo" }}', {}, ('','INVALID')),