cmd.ensure_finalized()
cmd.run()
- # what did we send ?
+ # 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'))
+ content_type = headers['Content-type']
+ self.assertTrue(content_type.startswith('multipart/form-data'))
self.assertEqual(self.last_open.req.get_method(), 'POST')
- self.assertEqual(self.last_open.req.get_full_url(),
- 'https://pypi.python.org/pypi')
- self.assertIn(b'xxx', self.last_open.req.data)
+ 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)
+ # The PyPI response body was echoed
+ results = self.get_logs(INFO)
+ self.assertIn('xyzzy\n', results[-1])
+
+
def test_suite():
return unittest.makeSuite(uploadTestCase)
Library
-------
-- Issue #12226: HTTPS is now used by default when connecting to PyPI.
-
+ - Fix TypeError on "setup.py upload --show-response".
+
- Issue #20045: Fix "setup.py register --list-classifiers".
- Issue #18879: When a method is looked up on a temporary file, avoid closing