summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-18 18:43:16 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-06-18 18:43:16 (GMT)
commit45ff4a54871abc01f8251100ad50385835c81b5f (patch)
tree9fb30009694b6e9171bbf6b0652e282334afe1ac
parent4c3e6877453591d6146ed313f674f35d28c8eb27 (diff)
parent56fe4749fb79609de7a6ab83f7d444d271f64e38 (diff)
downloadcpython-45ff4a54871abc01f8251100ad50385835c81b5f.zip
cpython-45ff4a54871abc01f8251100ad50385835c81b5f.tar.gz
cpython-45ff4a54871abc01f8251100ad50385835c81b5f.tar.bz2
Issue #27349: Merge from 3.5
-rw-r--r--Lib/distutils/command/upload.py2
-rw-r--r--Lib/distutils/tests/test_upload.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 0afcbf2..1fd574a 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -91,7 +91,7 @@ class upload(PyPIRCCommand):
data = {
# action
':action': 'file_upload',
- 'protcol_version': '1',
+ 'protocol_version': '1',
# identify release
'name': meta.get_name(),
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
index 964aac7..3eecf8a 100644
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -130,13 +130,14 @@ class uploadTestCase(PyPIRCCommandTestCase):
# what did we send ?
headers = dict(self.last_open.req.headers)
- self.assertEqual(headers['Content-length'], '2161')
+ self.assertEqual(headers['Content-length'], '2162')
content_type = headers['Content-type']
self.assertTrue(content_type.startswith('multipart/form-data'))
self.assertEqual(self.last_open.req.get_method(), 'POST')
expected_url = 'https://pypi.python.org/pypi'
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
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
results = self.get_logs(INFO)