diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 12:49:55 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 12:49:55 (GMT) |
| commit | 528bed8e4a8827c2135c843caee2c824d51201c2 (patch) | |
| tree | 762b59e967ffb85d4918b0afe50fcecd3aa3b364 /Lib/test/test_httplib.py | |
| parent | 708a5ea9648cab35597879c176a7366fd630c4db (diff) | |
| download | cpython-528bed8e4a8827c2135c843caee2c824d51201c2.zip cpython-528bed8e4a8827c2135c843caee2c824d51201c2.tar.gz cpython-528bed8e4a8827c2135c843caee2c824d51201c2.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 f11fac3..bb9d75f 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -123,7 +123,7 @@ class HeaderTests(TestCase): conn.sock = FakeSocket(None) conn.putrequest('GET','/') conn.putheader('Content-length',42) - self.assertTrue('Content-length: 42' in conn._buffer) + self.assertIn('Content-length: 42', conn._buffer) def test_ipv6host_header(self): # Default host header on IPv6 transaction should wrapped by [] if @@ -466,7 +466,7 @@ class TimeoutTest(TestCase): HTTPConnection and into the socket. ''' # default -- use global socket timeout - self.assertTrue(socket.getdefaulttimeout() is None) + self.assertIsNone(socket.getdefaulttimeout()) socket.setdefaulttimeout(30) try: httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT) @@ -477,7 +477,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 = httplib.HTTPConnection(HOST, TimeoutTest.PORT, |
