Ticket #11290: cycle_mult.patch

File cycle_mult.patch, 970 bytes (added by Stephen Kelly, 15 years ago)

Failing tests for this issue.

  • tests/regressiontests/templates/tests.py

     
    156156        split = token.split_contents()
    157157        self.assertEqual(split, ["sometag", '_("Page not found")', 'value|yesno:_("yes,no")'])
    158158
     159    def test_cycle_multiple_render(self):
     160        t = template.Template("{% cycle a,b,c as abc %}{% cycle abc %}")
     161        c = template.Context({})
     162        self.assertEqual(t.render(c),  t.render(c))
     163
     164        t = template.Template("{% for letter in abc %}{% cycle 'd' 'e' 'f' 'g'  %}{% endfor %}")
     165        c = template.Context({"abc": ("a", "b", "c")})
     166        self.assertEqual(t.render(c),  t.render(c))
     167
    159168    def test_url_reverse_no_settings_module(self):
    160169        # Regression test for #9005
    161170        from django.template import Template, Context, TemplateSyntaxError
Back to Top