mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Issue #19586: Update remaining deprecated assertions to their preferred usage.
This commit is contained in:
parent
13d4853ac0
commit
9d78e416f5
1 changed files with 2 additions and 2 deletions
|
@ -114,11 +114,11 @@ class uploadTestCase(PyPIRCCommandTestCase):
|
||||||
# what did we send ?
|
# what did we send ?
|
||||||
headers = dict(self.last_open.req.headers)
|
headers = dict(self.last_open.req.headers)
|
||||||
self.assertEqual(headers['Content-length'], '2087')
|
self.assertEqual(headers['Content-length'], '2087')
|
||||||
self.assert_(headers['Content-type'].startswith('multipart/form-data'))
|
self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
|
||||||
self.assertEqual(self.last_open.req.get_method(), 'POST')
|
self.assertEqual(self.last_open.req.get_method(), 'POST')
|
||||||
expected_url = 'https://pypi.python.org/pypi'
|
expected_url = 'https://pypi.python.org/pypi'
|
||||||
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
|
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
|
||||||
self.assert_(b'xxx' in self.last_open.req.data)
|
self.assertTrue(b'xxx' in self.last_open.req.data)
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
return unittest.makeSuite(uploadTestCase)
|
return unittest.makeSuite(uploadTestCase)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue