From: Donald Stufft Date: Wed, 3 Aug 2016 22:48:17 +0000 (-0400) Subject: Merge 3.3 X-Git-Tag: v3.4.6rc1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6c2217f2770c3791310a930a05eb4e60bb33282;p=thirdparty%2FPython%2Fcpython.git Merge 3.3 --- c6c2217f2770c3791310a930a05eb4e60bb33282 diff --cc Lib/distutils/tests/test_upload.py index bf4d558bf7d9,1402343e0a8b..cbbbe33bb064 --- a/Lib/distutils/tests/test_upload.py +++ b/Lib/distutils/tests/test_upload.py @@@ -90,7 -86,7 +90,7 @@@ class uploadTestCase(PyPIRCCommandTestC cmd.finalize_options() for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://upload.pypi.io/legacy/')): - ('repository', 'https://pypi.python.org/pypi')): ++ ('repository', 'https://upload.pypi.org/legacy/')): self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): @@@ -127,13 -123,12 +127,13 @@@ # what did we send ? headers = dict(self.last_open.req.headers) - self.assertEqual(headers['Content-length'], '2087') - self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) + self.assertEqual(headers['Content-length'], '2161') + 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://upload.pypi.io/legacy/' - self.assertEqual(self.last_open.req.get_full_url(), - 'https://upload.pypi.org/legacy/') - self.assertIn(b'xxx', self.last_open.req.data) ++ expected_url = 'https://upload.pypi.org/legacy/' + self.assertEqual(self.last_open.req.get_full_url(), expected_url) + self.assertTrue(b'xxx' in self.last_open.req.data) # The PyPI response body was echoed results = self.get_logs(INFO)