Lines Matching refs:http
27 http = httplib2.Http()
29 response, content = http.request(uri + "?query", "METHOD")
34 METHOD /?query HTTP/1.1\r\n\
42 http = httplib2.Http(cache=tests.get_cache_path())
43 new_http = pickle.loads(pickle.dumps(http))
45 assert tuple(sorted(new_http.__dict__)) == tuple(sorted(http.__dict__))
46 assert new_http.credentials.credentials == http.credentials.credentials
47 assert new_http.certificates.credentials == http.certificates.credentials
48 assert new_http.cache.cache == http.cache.cache
51 assert getattr(new_http, key) == getattr(http, key)
55 http = httplib2.Http()
56 http.request("http://random-domain:81/", connection_type=tests.MockHTTPConnection)
57 new_http = pickle.loads(pickle.dumps(http))
58 assert tuple(http.connections) == ("http:random-domain:81",)
63 http = httplib2.Http()
64 http.request = lambda: None
65 http.request.dummy_attr = "dummy_value"
66 new_http = pickle.loads(pickle.dumps(http))
87 http = httplib2.Http()
88 http.force_exception_to_status_code = True
90 response, content = http.request(uri)
102 http = httplib2.Http(timeout=0.1)
103 http.force_exception_to_status_code = True
106 response, content = http.request(uri)
125 http = httplib2.Http(timeout=0.5)
126 http.force_exception_to_status_code = True
129 response, _ = http.request(uri)
133 response, _ = http.request(uri)
147 http = httplib2.Http()
152 return tests.http_response_bytes(proto="HTTP/1.1")
155 http.request(uri, "GET") # conn1 req1
156 for c in http.connections.values():
158 http.request(uri, "GET", headers={"connection": "close"})
160 http.request(uri, "GET") # conn2 req1
198 @pytest.mark.parametrize("scheme", ("http", "https"))
203 httplib2.Http(timeout=0.1).request(uri)
226 http = httplib2.Http()
227 http.force_exception_to_status_code = True
228 uri = "http://localhost:443/"
229 # sorry, using internal structure of Http to check chosen scheme
230 with mock.patch("httplib2.Http._request") as m:
231 http.request(uri)
232 assert len(m.call_args) > 0, "expected Http._request() call"