Example #1
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project('sarge')
     self.assertIn('0.1.1', result)
     dist = result['0.1.1']
     self.assertEqual(dist.name, 'sarge')
     self.assertEqual(dist.version, '0.1.1')
     self.assertEqual(dist.source_url,
                      'https://pypi.python.org/packages/source/s/sarge/'
                      'sarge-0.1.1.tar.gz')
     self.assertEqual(dist.digest,
                      ('md5', '2a9b9d46e4ef6ae51e2a5ff7de93d9dd'))
     self.assertRaises(NotImplementedError, locator.get_distribution_names)
Example #2
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project('sarge')
     self.assertIn('0.1', result)
     dist = result['0.1']
     self.assertEqual(dist.name, 'sarge')
     self.assertEqual(dist.version, '0.1')
     self.assertEqual(dist.download_url,
                      'https://pypi.python.org/packages/source/s/sarge/'
                      'sarge-0.1.tar.gz')
     self.assertEqual(dist.md5_digest,
                      '961ddd9bc085fdd8b248c6dd96ceb1c8')
     self.assertRaises(NotImplementedError, locator.get_distribution_names)
Example #3
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project("sarge")
     LATEST_SARGE_VERSION = "0.1.4"
     LATEST_SARGE_MD5 = "285013875aa908ef1417055d3e74a00a"
     self.assertIn(LATEST_SARGE_VERSION, result)
     dist = result[LATEST_SARGE_VERSION]
     self.assertEqual(dist.name, "sarge")
     self.assertEqual(dist.version, LATEST_SARGE_VERSION)
     path = "/sarge-%s.tar.gz" % LATEST_SARGE_VERSION
     for url in dist.download_urls:
         self.assertTrue(url.endswith(path))
     self.assertEqual(dist.digests[url], ("md5", LATEST_SARGE_MD5))
     self.assertRaises(NotImplementedError, locator.get_distribution_names)
Example #4
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project('sarge')
     LATEST_SARGE_VERSION = '0.1.4'
     LATEST_SARGE_MD5 = '285013875aa908ef1417055d3e74a00a'
     self.assertIn(LATEST_SARGE_VERSION, result)
     dist = result[LATEST_SARGE_VERSION]
     self.assertEqual(dist.name, 'sarge')
     self.assertEqual(dist.version, LATEST_SARGE_VERSION)
     path = '/sarge-%s.tar.gz' % LATEST_SARGE_VERSION
     for url in dist.download_urls:
         self.assertTrue(url.endswith(path))
     self.assertEqual(dist.digests[url], ('md5', LATEST_SARGE_MD5))
     self.assertRaises(NotImplementedError, locator.get_distribution_names)
Example #5
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project('sarge')
     LATEST_SARGE_VERSION = '0.1.4'
     LATEST_SARGE_MD5 = '285013875aa908ef1417055d3e74a00a'
     self.assertIn(LATEST_SARGE_VERSION, result)
     dist = result[LATEST_SARGE_VERSION]
     self.assertEqual(dist.name, 'sarge')
     self.assertEqual(dist.version, LATEST_SARGE_VERSION)
     url = ('https://pypi.python.org/packages/source/s/sarge/'
            'sarge-%s.tar.gz' % LATEST_SARGE_VERSION)
     self.assertIn(url, dist.download_urls)
     self.assertEqual(dist.digests[url],('md5', LATEST_SARGE_MD5))
     self.assertRaises(NotImplementedError, locator.get_distribution_names)
Example #6
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project('sarge')
     LATEST_SARGE_VERSION = '0.1.4'
     LATEST_SARGE_MD5 = '285013875aa908ef1417055d3e74a00a'
     self.assertIn(LATEST_SARGE_VERSION, result)
     dist = result[LATEST_SARGE_VERSION]
     self.assertEqual(dist.name, 'sarge')
     self.assertEqual(dist.version, LATEST_SARGE_VERSION)
     url = ('https://pypi.python.org/packages/source/s/sarge/'
            'sarge-%s.tar.gz' % LATEST_SARGE_VERSION)
     self.assertIn(url, dist.download_urls)
     self.assertEqual(dist.digests[url], ('md5', LATEST_SARGE_MD5))
     self.assertRaises(NotImplementedError, locator.get_distribution_names)
Example #7
0
 def test_json(self):
     locator = PyPIJSONLocator(PYPI_RPC_HOST)
     result = locator.get_project('sarge')
     LATEST_SARGE_VERSION = '0.1.4'
     LATEST_SARGE_HASHES = (
         ('md5', '285013875aa908ef1417055d3e74a00a'),
         ('sha256',
          '59f93216723ddd9062d17cbbb90ed9e69267b84825cf0bde0b7f8d934c424823'
          ),
     )
     self.assertIn(LATEST_SARGE_VERSION, result)
     dist = result[LATEST_SARGE_VERSION]
     self.assertEqual(dist.name, 'sarge')
     self.assertEqual(dist.version, LATEST_SARGE_VERSION)
     path = '/sarge-%s.tar.gz' % LATEST_SARGE_VERSION
     for url in dist.download_urls:
         self.assertTrue(url.endswith(path))
     self.assertIn(dist.digests[url], LATEST_SARGE_HASHES)
     self.assertRaises(NotImplementedError, locator.get_distribution_names)