mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
+5
-3
@@ -412,11 +412,13 @@ class Project(object):
|
||||
pypi_source = {u'url': u'https://pypi.python.org/simple', u'verify_ssl': True, u'name': 'pypi'}
|
||||
sources = [pypi_source]
|
||||
|
||||
for num, index in enumerate(indexes):
|
||||
for i, index in enumerate(indexes):
|
||||
if not index:
|
||||
continue
|
||||
source_name = 'pip_index_{}'.format(num+1)
|
||||
sources.append({u'url': index, u'verify_ssl': True, u'name': source_name})
|
||||
source_name = 'pip_index_{}'.format(i)
|
||||
verify_ssl = index.startswith('https')
|
||||
|
||||
sources.append({u'url': index, u'verify_ssl': verify_ssl, u'name': source_name})
|
||||
|
||||
data = {
|
||||
u'source': sources,
|
||||
|
||||
@@ -43,12 +43,12 @@ class TestProject():
|
||||
|
||||
config_source_1 = pfile['source'][1]
|
||||
assert config_source_1['url'] == 'https://pypi.host.com/simple'
|
||||
assert config_source_1['name'] == 'pip_index_1'
|
||||
assert config_source_1['name'] == 'pip_index_0'
|
||||
assert config_source_1['verify_ssl'] is True
|
||||
|
||||
config_source_2 = pfile['source'][2]
|
||||
assert config_source_2['url'] == 'https://remote.packagehost.net/simple'
|
||||
assert config_source_2['name'] == 'pip_index_2'
|
||||
assert config_source_2['name'] == 'pip_index_1'
|
||||
assert config_source_2['verify_ssl'] is True
|
||||
|
||||
def test_parsed_pipfile(self):
|
||||
|
||||
Reference in New Issue
Block a user