[patch] Additional unit tests for default template tags
This patch, against rev 1941 of magic-removal, adds missing unit tests to tests/othertests/templates.py
for tags cycle
, filter
, firstof
, ifchanged
, regroup
, templatetag
and widthratio
. Tags debug
, now
and ssi
still don't have tests, as I'm not too clear on how best to implement them. Any thoughts?...
There is one issue relating to cycle
that needs clarification. It seems that {% cycle foo %
} is interpreted as a repeat occurrence of a cycle previously named foo
. If there is no cycle named foo
then I would expect this usage to yield a TemplateSyntaxError
, but in fact we see AttributeError: 'Parser' object has no attribute '_namedCycleNodes'
. Is this a bug, perhaps?
[patch] Additional unit tests for default template tags