Skip to content

Commit 2a7b013

Browse files
test attribute removal for wa-title
1 parent 6d59b83 commit 2a7b013

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

webstruct/tests/test_webannotator.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@ def assertApplyWaTitle(self, source, result):
1515
webannotator.apply_wa_title(tree)
1616
self.assertHtmlTreeEqual(tree, html_document_fromstring(result))
1717

18+
def test_wa_title_no_attributes(self):
19+
self.assertApplyWaTitle(
20+
b"""
21+
<html>
22+
<head><title>Foo</title></head>
23+
<body>contents</body>
24+
<wa-title class="classy"><b>hello</b>, world</wa-title>
25+
</html>
26+
""",
27+
28+
b"""
29+
<html>
30+
<head><title><b>hello</b>, world</title></head>
31+
<body>contents</body>
32+
</html>
33+
"""
34+
)
35+
1836
def test_wa_title(self):
1937
self.assertApplyWaTitle(
2038
b"""

0 commit comments

Comments
 (0)