Skip to content

Commit

Permalink
chore: add get_latest_pypi_repo_version monkeypatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-RA-King committed Aug 27, 2022
1 parent 67919cc commit f9f0f64
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def mock_get_precommitrepos() -> list[list]:
monkeypatch.setattr(piptools_sync, "get_precommit_repos", mock_get_precommitrepos)


@pytest.fixture
def mock_get_latest_github_repo_version(monkeypatch: Any) -> None:
def mock_get_latestgithubrepoversion() -> str:
version = "0.1.0"
Expand All @@ -32,3 +33,16 @@ def mock_get_latestgithubrepoversion() -> str:
"get_latest_github_repo_version",
mock_get_latestgithubrepoversion,
)


@pytest.fixture
def mock_get_latest_pypi_repo_version(monkeypatch: Any) -> None:
def mock_get_latestpypirepoversion() -> str:
version = "0.1.0"
return version

monkeypatch.setattr(
piptools_sync,
"get_latest_pypi_repo_version",
mock_get_latestpypirepoversion,
)

0 comments on commit f9f0f64

Please sign in to comment.