mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Merged revisions 76954 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76954 | tarek.ziade | 2009-12-21 01:02:20 +0100 (Mon, 21 Dec 2009) | 9 lines Merged revisions 76952 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76952 | tarek.ziade | 2009-12-21 00:23:34 +0100 (Mon, 21 Dec 2009) | 1 line Fixed #7552: fixed distutils.command.upload failure on very long passwords ........ ................
This commit is contained in:
parent
76c71ed9c5
commit
63d14c0752
3 changed files with 27 additions and 3 deletions
|
@ -10,6 +10,25 @@ from distutils.core import Distribution
|
|||
from distutils.tests import support
|
||||
from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase
|
||||
|
||||
PYPIRC_LONG_PASSWORD = """\
|
||||
[distutils]
|
||||
|
||||
index-servers =
|
||||
server1
|
||||
server2
|
||||
|
||||
[server1]
|
||||
username:me
|
||||
password:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
|
||||
[server2]
|
||||
username:meagain
|
||||
password: secret
|
||||
realm:acme
|
||||
repository:http://another.pypi/
|
||||
"""
|
||||
|
||||
|
||||
PYPIRC_NOPASSWORD = """\
|
||||
[distutils]
|
||||
|
||||
|
@ -96,7 +115,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
|
|||
self.write_file(path)
|
||||
command, pyversion, filename = 'xxx', '2.6', path
|
||||
dist_files = [(command, pyversion, filename)]
|
||||
self.write_file(self.rc, PYPIRC)
|
||||
self.write_file(self.rc, PYPIRC_LONG_PASSWORD)
|
||||
|
||||
# lets run it
|
||||
pkg_dir, dist = self.create_dist(dist_files=dist_files)
|
||||
|
@ -108,6 +127,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
|
|||
headers = dict(self.conn.headers)
|
||||
self.assertEquals(headers['Content-length'], '2087')
|
||||
self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
|
||||
self.assertFalse('\n' in headers['Authorization'])
|
||||
|
||||
self.assertEquals(self.conn.requests, [('POST', '/pypi')])
|
||||
self.assert_((b'xxx') in self.conn.body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue