Skip to content

Commit

Permalink
#334 Add test_without_amend_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
viliambalaz committed Apr 13, 2021
1 parent 1bd9ba6 commit 03b4306
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions poleno/utils/tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,3 +513,26 @@ def test_multiple_amend_tags(self):
u' <li>xxx!</li>'
u'</ul>'
u'')

def test_without_amend_tag(self):
rendered = self._render(
u'{% load prepend append before after delete set_attributes from poleno.amend %}'
u'<ul>'
u' <li>aaa</li>'
u' <li>bbb</li>'
u'</ul>'
u'<p>foobar</p>'
u'{% prepend path=".//ul" %}<li>ccc</li>{% endprepend %}'
u'{% append path=".//ul" %}<li>ddd</li>{% endappend %}'
u'{% before path=".//li[2]" %}<li>eee</li>{% endbefore %}'
u'{% after path=".//li[2]" %}<li>fff</li>{% endafter %}'
u'{% delete path=".//p" %}'
u'{% set_attributes path=".//ul" att=True %}'
u'')
self.assertHTMLEqual(rendered,
u'<ul>'
u' <li>aaa</li>'
u' <li>bbb</li>'
u'</ul>'
u'<p>foobar</p>'
u'')

0 comments on commit 03b4306

Please sign in to comment.