@pytest.mark.network
def test_finder_detects_latest_already_satisfied_pypi_links():
    req = InstallRequirement.from_line('initools', None)
    # the latest initools on pypi is 0.3.1
    latest_version = "0.3.1"
    satisfied_by = Mock(
        location="/path",
        parsed_version=parse_version(latest_version),
        version=latest_version,
    )
    req.satisfied_by = satisfied_by
    finder = PackageFinder(
        [],
        ["http://pypi.python.org/simple"],
        session=PipSession(),
    )

    with pytest.raises(BestVersionAlreadyInstalled):
        finder.find_requirement(req, True)
Similar to tornado.concurrent.return_future, but uses the auth
dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py/test_finder_detects_latest_already_satisfied_pypi_links--crossover with--dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/auth.py/_auth_return_future