mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 06:46:14 +00:00
test: HTML parser
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user