Ticket #32208: 32208-tests.diff

File 32208-tests.diff, 784 bytes (added by Mariusz Felisiak, 4 years ago)

Tests.

  • tests/template_tests/filter_tests/test_add.py

    diff --git a/tests/template_tests/filter_tests/test_add.py b/tests/template_tests/filter_tests/test_add.py
    index 0fcc661f4a..5809054921 100644
    a b class AddTests(SimpleTestCase):  
    4646        output = self.engine.render_to_string('add07', {'d': date(2000, 1, 1), 't': timedelta(10)})
    4747        self.assertEqual(output, 'Jan. 11, 2000')
    4848
     49    @setup({'add08': '{{ s1|add:lazy_s2 }}'})
     50    def test_add08(self):
     51        from django.utils.translation import gettext_lazy
     52        output = self.engine.render_to_string('add08', {'s1': 'string', 'lazy_s2': gettext_lazy('lazy')})
     53        self.assertEqual(output, 'stringlazy')
     54
    4955
    5056class FunctionTests(SimpleTestCase):
    5157
Back to Top