mirror of
https://github.com/python/cpython.git
synced 2025-10-31 21:51:50 +00:00
Issue #27349: Fix typo in distutils upload command
This commit is contained in:
parent
d37de3c41d
commit
56fe4749fb
2 changed files with 3 additions and 2 deletions
|
|
@ -91,7 +91,7 @@ def upload_file(self, command, pyversion, filename):
|
||||||
data = {
|
data = {
|
||||||
# action
|
# action
|
||||||
':action': 'file_upload',
|
':action': 'file_upload',
|
||||||
'protcol_version': '1',
|
'protocol_version': '1',
|
||||||
|
|
||||||
# identify release
|
# identify release
|
||||||
'name': meta.get_name(),
|
'name': meta.get_name(),
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,14 @@ def test_upload(self):
|
||||||
|
|
||||||
# what did we send ?
|
# what did we send ?
|
||||||
headers = dict(self.last_open.req.headers)
|
headers = dict(self.last_open.req.headers)
|
||||||
self.assertEqual(headers['Content-length'], '2161')
|
self.assertEqual(headers['Content-length'], '2162')
|
||||||
content_type = headers['Content-type']
|
content_type = headers['Content-type']
|
||||||
self.assertTrue(content_type.startswith('multipart/form-data'))
|
self.assertTrue(content_type.startswith('multipart/form-data'))
|
||||||
self.assertEqual(self.last_open.req.get_method(), 'POST')
|
self.assertEqual(self.last_open.req.get_method(), 'POST')
|
||||||
expected_url = 'https://pypi.python.org/pypi'
|
expected_url = 'https://pypi.python.org/pypi'
|
||||||
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
|
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
|
||||||
self.assertTrue(b'xxx' in self.last_open.req.data)
|
self.assertTrue(b'xxx' in self.last_open.req.data)
|
||||||
|
self.assertIn(b'protocol_version', self.last_open.req.data)
|
||||||
|
|
||||||
# The PyPI response body was echoed
|
# The PyPI response body was echoed
|
||||||
results = self.get_logs(INFO)
|
results = self.get_logs(INFO)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue