diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 12:50:08 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 12:50:08 (GMT) |
commit | 25d8aeac7c1e24df79c18f6391b7e42b873d66d8 (patch) | |
tree | 3171eaac6be60dd8623e5d0ccab67adf38a44215 /Lib/test/test_httplib.py | |
parent | 3a20a5deade014a4559a71962600b23ee9f608f4 (diff) | |
download | cpython-25d8aeac7c1e24df79c18f6391b7e42b873d66d8.zip cpython-25d8aeac7c1e24df79c18f6391b7e42b873d66d8.tar.gz cpython-25d8aeac7c1e24df79c18f6391b7e42b873d66d8.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.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 4410a93..c8ded92 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -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, |