Skip to content

Commit

Permalink
fix(tests): rename SimpleRepositoryPage to HTMLPage
Browse files Browse the repository at this point in the history
  • Loading branch information
chadac committed Jul 8, 2024
1 parent b613914 commit d342754
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/repositories/test_legacy_proxy_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import urllib.parse as urlparse
from pathlib import Path

from poetry.repositories.link_sources.html import SimpleRepositoryPage
from poetry.repositories.link_sources.html import HTMLPage

from poetry_plugin_pypi_proxy.plugin import LegacyProxyRepository
from poetry_plugin_pypi_proxy.utils import Version
Expand All @@ -16,13 +16,13 @@ class MockRepository(LegacyProxyRepository):
def __init__(self) -> None:
super().__init__("proxy", url="http://legacy.foo.bar", disable_cache=True)

def _get_page(self, name: str) -> SimpleRepositoryPage | None:
def _get_page(self, name: str) -> HTMLPage | None:
fixture = self.FIXTURES / (name + ".html")
if not fixture.exists():
return None

with fixture.open(encoding="utf-8") as f:
return SimpleRepositoryPage(self._url + "/" + name + ".html", f.read())
return HTMLPage(self._url + "/" + name + ".html", f.read())

def _download(self, url: str, dest: Path) -> None:
filename = urlparse.urlparse(url).path.rsplit("/")[-1]
Expand Down

0 comments on commit d342754

Please sign in to comment.