]> granicus.if.org Git - python/commitdiff
Issue #27349: Fix typo in distutils upload command
authorBerker Peksag <berker.peksag@gmail.com>
Sat, 18 Jun 2016 18:42:37 +0000 (21:42 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Sat, 18 Jun 2016 18:42:37 +0000 (21:42 +0300)
Lib/distutils/command/upload.py
Lib/distutils/tests/test_upload.py

index 0afcbf233e7c96b22c75f52e75146e80c10bd9e1..1fd574a9f15b54bf9fdc3643a34137a52859efb4 100644 (file)
@@ -91,7 +91,7 @@ class upload(PyPIRCCommand):
         data = {
             # action
             ':action': 'file_upload',
-            'protcol_version': '1',
+            'protocol_version': '1',
 
             # identify release
             'name': meta.get_name(),
index 964aac7e80013fcf3e1b3ba0bc094beceb122cb8..3eecf8afd46de0407385ed3d2c36e5393a7b6e69 100644 (file)
@@ -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)