Skip to content

Commit

Permalink
Update test_html.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Knio committed Jul 25, 2022
1 parent 258c4df commit b52dd91
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_html.py
Expand Up @@ -337,8 +337,9 @@ def test_xhtml():
assert span('hi', br(), 'there').render(xhtml=False) == \
'''<span>hi<br>there</span>'''


def test_verbatim_attributes():
assert tag('custom-element', attr = '{<div></div>}').render() == \
'''<custom-element attr="{&lt;div&gt;&lt;/div&gt;}"></custom-element>'''
assert tag('custom-element', attr = raw('{<div></div>}')).render() == \
'''<custom-element attr="{<div></div>}"></custom-element>'''
assert div(attr = '{<div></div>}').render() == \
'''<div attr="{&lt;div&gt;&lt;/div&gt;}"></div>'''
assert div(attr = raw('{<div></div>}')).render() == \
'''<div attr="{<div></div>}"></div>'''

0 comments on commit b52dd91

Please sign in to comment.