diff --git a/tests/integration/test_relative_links.py b/tests/integration/test_relative_links.py index 3b158cfec..ea1545566 100644 --- a/tests/integration/test_relative_links.py +++ b/tests/integration/test_relative_links.py @@ -3,7 +3,7 @@ import io import os -import lxml +import lxml.html import pytest from nikola import __main__ @@ -27,7 +27,7 @@ def test_relative_links(build, output_dir): assert not any( url.startswith("..") - for _, _, url, _ in lxml.html.iterlinks(data) + for _, _, url, _ in lxml.html.fromstring(data).iterlinks() if url.endswith("css") ) diff --git a/tests/integration/test_relative_links_with_pages_in_root.py b/tests/integration/test_relative_links_with_pages_in_root.py index 16f9d6fdd..b07268245 100644 --- a/tests/integration/test_relative_links_with_pages_in_root.py +++ b/tests/integration/test_relative_links_with_pages_in_root.py @@ -3,7 +3,7 @@ import io import os -import lxml +import lxml.html import pytest from nikola import __main__ @@ -26,7 +26,7 @@ def test_relative_links(build, output_dir): assert not any( url.startswith("..") - for _, _, url, _ in lxml.html.iterlinks(data) + for _, _, url, _ in lxml.html.fromstring(data).iterlinks() if url.endswith("css") )