summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httplib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-08 12:51:10 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-08 12:51:10 (GMT)
commitd3e1207191dcb84a58706a5101177f36c09c5681 (patch)
treedd8bafcf64e4b1fa8bdf65f21f44a2d04fc89861 /Lib/test/test_httplib.py
parent6c9678e1a5651bbaa2bfa31d564f2117033fd494 (diff)
parent25d8aeac7c1e24df79c18f6391b7e42b873d66d8 (diff)
downloadcpython-d3e1207191dcb84a58706a5101177f36c09c5681.zip
cpython-d3e1207191dcb84a58706a5101177f36c09c5681.tar.gz
cpython-d3e1207191dcb84a58706a5101177f36c09c5681.tar.bz2
Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests.
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r--Lib/test/test_httplib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index bcd0a02..30b6c0c 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -134,7 +134,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
@@ -723,7 +723,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)
@@ -734,7 +734,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,