

def test_get_index_urls_locations():
    'Check that the canonical name is on all indexes'
    finder = PackageFinder([], ['file://index1/', 'file://index2'], session=PipSession())
    locations = finder._get_index_urls_locations(InstallRequirement.from_line('Complex_Name').name)
    assert (locations == ['file://index1/complex-name/', 'file://index2/complex-name/'])

dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py test_get_index_urls_locations/original