Home | History | Annotate | Download | only in test

Lines Matching refs:httplib

1 import httplib

3 import httplib
26 raise httplib.UnimplementedFileMode()
47 This is used below to test that httplib doesn't try to read
82 conn = httplib.HTTPConnection('example.com')
94 conn = httplib.HTTPConnection('example.com')
105 conn = httplib.HTTPConnection('[2001::]:81')
113 conn = httplib.HTTPConnection('[2001:102A::]')
126 resp = httplib.HTTPResponse(sock)
133 resp = httplib.HTTPResponse(sock)
134 self.assertRaises(httplib.BadStatusLine, resp.begin)
137 exc = httplib.BadStatusLine('')
145 resp = httplib.HTTPResponse(sock)
156 self.assertRaises(httplib.InvalidURL, httplib.HTTP, hp)
163 http = httplib.HTTP(hp)
183 r = httplib.HTTPResponse(s)
197 resp = httplib.HTTPResponse(sock, method="HEAD")
207 conn = httplib.HTTPConnection('example.com')
215 conn = httplib.HTTPConnection('example.com')
237 resp = httplib.HTTPResponse(sock, method="GET")
244 resp = httplib.HTTPResponse(sock, method="GET")
248 except httplib.IncompleteRead, i:
267 resp = httplib.HTTPResponse(sock, method="HEAD")
277 resp = httplib.HTTPResponse(sock, method="GET")
284 resp = httplib.HTTPResponse(sock, method="GET")
288 except httplib.IncompleteRead as i:
305 conn = httplib.HTTPConnection("example.com")
318 resp = httplib.HTTPResponse(sock)
327 resp = httplib.HTTPResponse(FakeSocket(body))
328 self.assertRaises((httplib.LineTooLong, httplib.BadStatusLine), resp.begin)
335 resp = httplib.HTTPResponse(FakeSocket(body))
336 self.assertRaises(httplib.LineTooLong, resp.begin)
346 resp = httplib.HTTPResponse(FakeSocket(body))
348 self.assertRaises(httplib.LineTooLong, resp.read)
353 self.assertEqual(httplib.responses[httplib.NOT_FOUND], "Not Found")
372 self.conn = httplib.HTTPConnection(HOST, self.port,
377 @unittest.skipIf(not hasattr(httplib, 'HTTPSConnection'),
378 'httplib.HTTPSConnection not defined')
380 self.conn = httplib.HTTPSConnection(HOST, self.port,
407 httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT)
418 httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT,
427 httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT, timeout=30)
438 if hasattr(httplib, 'HTTPSConnection'):
439 h = httplib.HTTPSConnection(HOST, TimeoutTest.PORT, timeout=30)