def repository(
    core: Core,
    mocker: MockerFixture,
    repository_pypi_json: Path,
    local_finder: type[None],
) -> RepositoryData:
    """
    A fixture providing a mock PyPI repository

    Returns:
        A mock repository
    """
    repo = RepositoryData(repository_pypi_json)
    core.repository_class = TestRepository
    mocker.patch.object(TestRepository, "get_data", return_value=repo.pypi_data)
    return repo

    A fixture providing a mock PyPI repository

    Returns:
        A mock repository
    
src/pdm/pytest.py