Kaydet (Commit) 692497a3 authored tarafından Donald Stufft's avatar Donald Stufft

Switch upload.pypi.io to upload.pypi.org

üst 2246f39c
...@@ -21,7 +21,7 @@ password:%s ...@@ -21,7 +21,7 @@ password:%s
class PyPIRCCommand(Command): class PyPIRCCommand(Command):
"""Base command that knows how to handle the .pypirc file """Base command that knows how to handle the .pypirc file
""" """
DEFAULT_REPOSITORY = 'https://upload.pypi.io/legacy/' DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
DEFAULT_REALM = 'pypi' DEFAULT_REALM = 'pypi'
repository = None repository = None
realm = None realm = None
......
...@@ -89,7 +89,7 @@ class PyPIRCCommandTestCase(support.TempdirManager, ...@@ -89,7 +89,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
config = config.items() config = config.items()
config.sort() config.sort()
waited = [('password', 'secret'), ('realm', 'pypi'), waited = [('password', 'secret'), ('realm', 'pypi'),
('repository', 'https://upload.pypi.io/legacy/'), ('repository', 'https://upload.pypi.org/legacy/'),
('server', 'server1'), ('username', 'me')] ('server', 'server1'), ('username', 'me')]
self.assertEqual(config, waited) self.assertEqual(config, waited)
...@@ -99,7 +99,7 @@ class PyPIRCCommandTestCase(support.TempdirManager, ...@@ -99,7 +99,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
config = config.items() config = config.items()
config.sort() config.sort()
waited = [('password', 'secret'), ('realm', 'pypi'), waited = [('password', 'secret'), ('realm', 'pypi'),
('repository', 'https://upload.pypi.io/legacy/'), ('repository', 'https://upload.pypi.org/legacy/'),
('server', 'server-login'), ('username', 'tarek')] ('server', 'server-login'), ('username', 'tarek')]
self.assertEqual(config, waited) self.assertEqual(config, waited)
......
...@@ -82,7 +82,7 @@ class uploadTestCase(PyPIRCCommandTestCase): ...@@ -82,7 +82,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
cmd.finalize_options() cmd.finalize_options()
for attr, waited in (('username', 'me'), ('password', 'secret'), for attr, waited in (('username', 'me'), ('password', 'secret'),
('realm', 'pypi'), ('realm', 'pypi'),
('repository', 'https://upload.pypi.io/legacy/')): ('repository', 'https://upload.pypi.org/legacy/')):
self.assertEqual(getattr(cmd, attr), waited) self.assertEqual(getattr(cmd, attr), waited)
def test_saved_password(self): def test_saved_password(self):
...@@ -123,7 +123,7 @@ class uploadTestCase(PyPIRCCommandTestCase): ...@@ -123,7 +123,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
self.assertEqual(self.last_open.req.get_method(), 'POST') self.assertEqual(self.last_open.req.get_method(), 'POST')
self.assertEqual(self.last_open.req.get_full_url(), self.assertEqual(self.last_open.req.get_full_url(),
'https://upload.pypi.io/legacy/') 'https://upload.pypi.org/legacy/')
self.assertIn('xxx', self.last_open.req.data) self.assertIn('xxx', self.last_open.req.data)
auth = self.last_open.req.headers['Authorization'] auth = self.last_open.req.headers['Authorization']
self.assertNotIn('\n', auth) self.assertNotIn('\n', auth)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment