magic-removal: Fixed template unit tests. Corrected expected output for 'spaceless' tests, added extra error condition for cycle tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
00f93bc7bb
commit
c983ab3e16
|
@ -344,6 +344,8 @@ def cycle(parser, token):
|
|||
|
||||
elif len(args) == 2:
|
||||
name = args[1]
|
||||
if not hasattr(parser, '_namedCycleNodes'):
|
||||
raise TemplateSyntaxError("No named cycles in template: '%s' is not defined" % name)
|
||||
if not parser._namedCycleNodes.has_key(name):
|
||||
raise TemplateSyntaxError("Named cycle '%s' does not exist" % name)
|
||||
return parser._namedCycleNodes[name]
|
||||
|
|
|
@ -317,8 +317,8 @@ TEMPLATE_TESTS = {
|
|||
### I18N ##################################################################
|
||||
|
||||
# {% spaceless %} tag
|
||||
'spaceless01': ("{% spaceless %} <b> <i> text </i> </b> {% endspaceless %}", {}, "<b><i> text </i></b>"),
|
||||
'spaceless02': ("{% spaceless %} <b> \n <i> text </i> \n </b> {% endspaceless %}", {}, "<b><i> text </i></b>"),
|
||||
'spaceless01': ("{% spaceless %} <b> <i> text </i> </b> {% endspaceless %}", {}, "<b> <i> text </i> </b>"),
|
||||
'spaceless02': ("{% spaceless %} <b> \n <i> text </i> \n </b> {% endspaceless %}", {}, "<b> <i> text </i> </b>"),
|
||||
'spaceless03': ("{% spaceless %}<b><i>text</i></b>{% endspaceless %}", {}, "<b><i>text</i></b>"),
|
||||
|
||||
# simple translation of a string delimited by '
|
||||
|
|
Loading…
Reference in New Issue