def test_no_extra_pypi_servers(self): """ should return empty list when no additional pypi servers are specified in .pypirc """ pypirc = 'test/fixtures/pypirc-default.txt' self.assertEqual(package_manager.extra_pypi_index_servers(pypirc), [])
def test_extra_pypi_servers(self): """ should return a list of URLs for any additional python servers specified in .pypirc """ pypirc = 'test/fixtures/pypirc-extra.txt' self.assertEqual(package_manager.extra_pypi_index_servers(pypirc), [ 'http://localhost:8000/simple', 'http://pypi.internal.com/simple' ])
def test_extra_pypi_servers_with_no_arg(self): """should use $HOME/.pypirc when no arg is given""" self.assertEqual(package_manager.extra_pypi_index_servers(), [ 'http://localhost:8000/simple', 'http://pypi.internal.com/simple' ])
def test_missing_pypirc(self): """should return an empty list if .pypirc is missing""" self.assertEqual( package_manager.extra_pypi_index_servers('does not exist'), [])