Skip to content

Commit 55192a1

Browse files
committed
Fix tests
1 parent 21fadc5 commit 55192a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/unit/test_collector.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from pip._internal.exceptions import NetworkConnectionError
1515
from pip._internal.index.collector import (
16-
HTMLPage,
16+
IndexContent,
1717
LinkCollector,
1818
_clean_link,
1919
_clean_url_path,
@@ -426,7 +426,7 @@ def _test_parse_links_data_attribute(
426426
"<body>{}</body></html>"
427427
).format(anchor_html)
428428
html_bytes = html.encode("utf-8")
429-
page = HTMLPage(
429+
page = IndexContent(
430430
html_bytes,
431431
encoding=None,
432432
# parse_links() is cached by url, so we inject a random uuid to ensure
@@ -503,22 +503,22 @@ def test_parse_links_caches_same_page_by_url() -> None:
503503

504504
url = "https://example.com/simple/"
505505

506-
page_1 = HTMLPage(
506+
page_1 = IndexContent(
507507
html_bytes,
508508
encoding=None,
509509
url=url,
510510
)
511511
# Make a second page with zero content, to ensure that it's not accessed,
512512
# because the page was cached by url.
513-
page_2 = HTMLPage(
513+
page_2 = IndexContent(
514514
b"",
515515
encoding=None,
516516
url=url,
517517
)
518518
# Make a third page which represents an index url, which should not be
519519
# cached, even for the same url. We modify the page content slightly to
520520
# verify that the result is not cached.
521-
page_3 = HTMLPage(
521+
page_3 = IndexContent(
522522
re.sub(b"pkg1", b"pkg2", html_bytes),
523523
encoding=None,
524524
url=url,
@@ -541,7 +541,7 @@ def test_parse_links_caches_same_page_by_url() -> None:
541541
def test_parse_link_handles_deprecated_usage_properly() -> None:
542542
html = b'<a href="/pkg1-1.0.tar.gz"></a><a href="/pkg1-2.0.tar.gz"></a>'
543543
url = "https://example.com/simple/"
544-
page = HTMLPage(html, encoding=None, url=url, cache_link_parsing=False)
544+
page = IndexContent(html, encoding=None, url=url, cache_link_parsing=False)
545545

546546
parsed_links = list(parse_links(page, use_deprecated_html5lib=True))
547547

0 commit comments

Comments
 (0)