Ejemplo n.º 1
0
 def test_official_pypi(self, exception_class):
     with patch.object(ConfigParser, 'get') as config_get:
         config_get.return_value = "http://pypi.infinidat.com/simple"
         try:
             ConfigParser().get.side_effect = exception_class("x")
         except TypeError:
             ConfigParser().get.side_effect = exception_class("x", "y")
         url = utils._get_package_url("zc.buildout")
         self.assertNotIn("#", url)
Ejemplo n.º 2
0
 def test_custom_pypi(self):
     with patch.object(ConfigParser, 'get') as config_get:
         config_get.return_value = "http://pypi.infinidat.com/simple"
         url = utils._get_package_url("zc.buildout")
         self.assertIn("pypi.infinidat.com//media/", url)
         self.assertNotIn("#", url)