diff options
Diffstat (limited to 'Lib/distutils/tests/test_upload.py')
-rw-r--r-- | Lib/distutils/tests/test_upload.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py index 8532369aa5..f53eb266ed 100644 --- a/Lib/distutils/tests/test_upload.py +++ b/Lib/distutils/tests/test_upload.py @@ -124,11 +124,12 @@ class uploadTestCase(PyPIRCCommandTestCase): # 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) |