test: HTML parser

This commit is contained in:
Xiao Tan
2019-02-22 14:15:19 +08:00
parent f23ccbfcb5
commit 9d78a00574
+9
View File
@@ -173,6 +173,15 @@ def test_absolute_links(url, link, expected):
assert html.absolute_links.pop() == expected
@pytest.mark.parser
def test_parser():
doc = """<a href='https://httpbin.org'>httpbin.org\n</a>"""
html = HTML(html=doc)
assert html.find('html')
assert html.element('a').text().strip() == 'httpbin.org'
@pytest.mark.render
def test_render():
r = get()