mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests.
This commit is contained in:
parent
3a20a5dead
commit
25d8aeac7c
8 changed files with 27 additions and 26 deletions
|
@ -132,7 +132,7 @@ class HeaderTests(TestCase):
|
|||
conn.sock = FakeSocket(None)
|
||||
conn.putrequest('GET','/')
|
||||
conn.putheader('Content-length', 42)
|
||||
self.assertTrue(b'Content-length: 42' in conn._buffer)
|
||||
self.assertIn(b'Content-length: 42', conn._buffer)
|
||||
|
||||
def test_ipv6host_header(self):
|
||||
# Default host header on IPv6 transaction should wrapped by [] if
|
||||
|
@ -699,7 +699,7 @@ class TimeoutTest(TestCase):
|
|||
# and into the socket.
|
||||
|
||||
# default -- use global socket timeout
|
||||
self.assertTrue(socket.getdefaulttimeout() is None)
|
||||
self.assertIsNone(socket.getdefaulttimeout())
|
||||
socket.setdefaulttimeout(30)
|
||||
try:
|
||||
httpConn = client.HTTPConnection(HOST, TimeoutTest.PORT)
|
||||
|
@ -710,7 +710,7 @@ class TimeoutTest(TestCase):
|
|||
httpConn.close()
|
||||
|
||||
# no timeout -- do not use global socket default
|
||||
self.assertTrue(socket.getdefaulttimeout() is None)
|
||||
self.assertIsNone(socket.getdefaulttimeout())
|
||||
socket.setdefaulttimeout(30)
|
||||
try:
|
||||
httpConn = client.HTTPConnection(HOST, TimeoutTest.PORT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue