Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): rename SimpleRepositoryPage to HTMLPage #13

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading