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):
# 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)