• Home
  • Raw
  • Download

Lines Matching full:http

10 #      http://www.apache.org/licenses/LICENSE-2.0
68 from googleapiclient.http import build_http
69 from googleapiclient.http import BatchHttpRequest
70 from googleapiclient.http import HttpMock
71 from googleapiclient.http import HttpMockSequence
72 from googleapiclient.http import MediaFileUpload
73 from googleapiclient.http import MediaIoBaseUpload
74 from googleapiclient.http import MediaUpload
75 from googleapiclient.http import MediaUploadProgress
76 from googleapiclient.http import tunnel_patch
227 fake_root_desc = {"rootUrl": "http://root/", "servicePath": "fake/"}
256 "http://root/upload/fake/fake-path/",
272 "http://root/upload/fake/fake-path/",
296 "http://root/upload/fake/fake-path/",
314 "http://root/upload/fake/fake-path/",
410 self.fail("should have raised a TypeError exception over missing http=.")
415 self.http = HttpMock(datafile("malformed.json"), {"status": "200"})
417 plus = build("plus", "v1", http=self.http, cache_discovery=False)
423 http = HttpMockSequence(
430 plus = build("plus", "v1", http=http, cache_discovery=False)
433 http = HttpMock(datafile("plus.json"), {"status": "200"})
435 build("plus", "v1", http=http, credentials=mock.sentinel.credentials)
481 self.assertIsInstance(plus._http.http, httplib2.Http)
482 self.assertIsInstance(plus._http.http.timeout, int)
483 self.assertGreater(plus._http.http.timeout, 0)
487 # Cleanup auth field, so we would use plain http client
496 self.assertIsInstance(plus._http, httplib2.Http)
501 http = HttpMock()
504 discovery, base="https://www.googleapis.com/", http=http
506 self.assertEquals(plus._http, http)
513 self.assertIsInstance(plus._http, httplib2.Http)
531 http = HttpMockSequence(
537 http=http,
539 discoveryServiceUrl="http://example.com",
543 self.assertEqual(e.uri, "http://example.com?userIp=10.0.0.1")
549 http = HttpMockSequence(
555 http=http,
557 discoveryServiceUrl="http://example.com",
561 self.assertEqual(e.uri, "http://example.com")
567 http = HttpMockSequence(
573 http=http,
575 discoveryServiceUrl="http://example.com",
579 self.assertEqual(e.uri, "http://example.com?key=foo")
582 http = HttpMockSequence(
588 zoo = build("zoo", "v1", http=http, cache_discovery=False)
609 self.http = HttpMock(datafile("plus.json"), {"status": "200"})
613 plus = build("plus", "v1", http=self.http)
633 self.http = HttpMock(None, {"status": "200"})
635 plus = build("plus", "v1", http=self.http)
671 self.http = HttpMock(datafile("plus.json"), {"status": "200"})
673 plus = build("plus", "v1", http=self.http)
689 self.http = HttpMock(None, {"status": "200"})
691 plus = build("plus", "v1", http=self.http)
702 self.http = HttpMock(datafile("plus.json"), {"status": "200"})
703 plus = build("plus", "v1", http=self.http)
745 http = HttpMock(datafile("zoo.json"), {"status": "200"})
746 zoo = build("zoo", "v1", http=http)
778 http = HttpMock(datafile("zoo.json"), {"status": "200"})
779 zoo = build("zoo", "v1", http=http)
788 http = HttpMock(datafile("zoo.json"), {"status": "200"})
789 zoo = build("zoo", "v1", http=http)
797 http = HttpMock(datafile("zoo.json"), {"status": "200"})
798 zoo = build("zoo", "v1", http=http)
807 http = HttpMock(datafile("zoo.json"), {"status": "200"})
808 zoo = build("zoo", "v1", http=http)
817 http = HttpMock(datafile("zoo.json"), {"status": "200"})
818 zoo = build("zoo", "v1", http=http)
824 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
826 zoo = build("zoo", "v1", http=self.http)
833 self.http = HttpMock(datafile("plus.json"), {"status": "200"})
835 plus = build("plus", "v1", http=self.http)
840 http = HttpMockSequence(
846 http = tunnel_patch(http)
847 zoo = build("zoo", "v1", http=http, cache_discovery=False)
850 self.assertTrue("x-http-method-override" in resp)
853 self.http = HttpMock(datafile("plus.json"), {"status": "200"})
854 plus = build("plus", "v1", http=self.http)
878 # Should be an ordinary httplib2.Http instance and not AuthorizedHttp.
879 self.assertIsInstance(service._http, httplib2.Http)
884 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
885 zoo = build("zoo", "v1", http=self.http)
895 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
896 zoo = build("zoo", "v1", http=self.http)
905 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
906 zoo = build("zoo", "v1", http=self.http)
913 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
914 zoo = build("zoo", "v1", http=self.http)
922 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
923 zoo = build("zoo", "v1", http=self.http)
928 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
929 zoo = build("zoo", "v1", http=self.http)
935 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
936 zoo = build("zoo", "v1", http=self.http)
951 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
952 zoo = build("zoo", "v1", http=self.http)
964 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
965 zoo = build("zoo", "v1", http=self.http)
985 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
986 zoo = build("zoo", "v1", http=self.http)
1001 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1002 zoo = build("zoo", "v1", http=self.http)
1035 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1036 zoo = build("zoo", "v1", http=self.http)
1042 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1043 zoo = build("zoo", "v1", http=self.http)
1056 http = HttpMockSequence(
1058 ({"status": "200", "location": "http://upload.example.com"}, ""),
1059 ({"status": "308", "location": "http://upload.example.com/2"}, ""),
1063 "location": "http://upload.example.com/3",
1071 "location": "http://upload.example.com/4",
1080 status, body = request.next_chunk(http=http)
1087 self.assertEquals(request.resumable_uri, "http://upload.example.com/2")
1092 status, body = request.next_chunk(http=http)
1093 self.assertEquals(request.resumable_uri, "http://upload.example.com/3")
1098 status, body = request.next_chunk(http=http)
1099 self.assertEquals(request.resumable_uri, "http://upload.example.com/4")
1104 status, body = request.next_chunk(http=http)
1110 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1111 zoo = build("zoo", "v1", http=self.http)
1122 http = HttpMockSequence(
1124 ({"status": "200", "location": "http://upload.example.com"}, ""),
1128 "location": "http://upload.example.com/2",
1136 "location": "http://upload.example.com/3",
1145 status, body = request.next_chunk(http=http)
1152 self.assertEquals(request.resumable_uri, "http://upload.example.com/2")
1157 status, body = request.next_chunk(http=http)
1158 self.assertEquals(request.resumable_uri, "http://upload.example.com/3")
1163 status, body = request.next_chunk(http=http)
1169 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1170 zoo = build("zoo", "v1", http=self.http)
1180 http = HttpMockSequence(
1182 ({"status": "200", "location": "http://upload.example.com"}, ""),
1186 "location": "http://upload.example.com/2",
1194 "location": "http://upload.example.com/3",
1203 body = request.execute(http=http)
1208 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1209 zoo = build("zoo", "v1", http=self.http)
1214 http = HttpMockSequence(
1215 [({"status": "400", "location": "http://upload.example.com"}, "")]
1219 request.execute(http=http)
1226 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1227 zoo = build("zoo", "v1", http=self.http)
1232 http = HttpMockSequence(
1234 ({"status": "200", "location": "http://upload.example.com"}, ""),
1239 self.assertRaises(HttpError, request.execute, http=http)
1242 http = HttpMockSequence(
1249 status, body = request.next_chunk(http=http)
1258 http = HttpMockSequence([({"status": "400"}, "")])
1259 self.assertRaises(HttpError, request.execute, http=http)
1263 http = HttpMockSequence([({"status": "200"}, '{"foo": "bar"}')])
1264 status, body = request.next_chunk(http=http)
1268 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1269 zoo = build("zoo", "v1", http=self.http)
1280 http = HttpMockSequence(
1282 ({"status": "200", "location": "http://upload.example.com"}, ""),
1286 "location": "http://upload.example.com/2",
1295 body = request.execute(http=http)
1299 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1300 zoo = build("zoo", "v1", http=self.http)
1311 http = HttpMockSequence(
1313 ({"status": "200", "location": "http://upload.example.com"}, ""),
1319 body = request.execute(http=http)
1324 http = HttpMockSequence(
1326 ({"status": "200", "location": "http://upload.example.com"}, ""),
1331 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1332 zoo = build("zoo", "v1", http=self.http)
1354 status, body = request.next_chunk(http=http)
1358 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1359 zoo = build("zoo", "v1", http=self.http)
1392 http = HttpMockSequence(
1394 ({"status": "200", "location": "http://upload.example.com"}, ""),
1399 self.assertRaises(NotImplementedError, request.next_chunk, http=http)
1404 http = HttpMockSequence(
1406 ({"status": "200", "location": "http://upload.example.com"}, ""),
1411 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1412 zoo = build("zoo", "v1", http=self.http)
1422 status, body = request.next_chunk(http=http)
1428 http = HttpMockSequence(
1430 ({"status": "200", "location": "http://upload.example.com"}, ""),
1435 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1436 zoo = build("zoo", "v1", http=self.http)
1448 self.assertRaises(HttpError, request.next_chunk, http=http)
1450 http = HttpMockSequence(
1455 request.next_chunk(http=http)
1485 http = HttpMock(datafile("zoo.json"), {"status": "200"})
1486 zoo = build("zoo", "v1", http=http)
1526 http = build_http()
1527 original_request = http.request
1534 http.request = wrapped_request
1535 return http
1556 http = self._dummy_zoo_request()
1557 http = credentials.authorize(http)
1558 self.assertTrue(hasattr(http.request, "credentials"))
1560 zoo = build("zoo", "v1", http=http)
1568 self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
1569 zoo = build("zoo", "v1", http=self.http)
1578 http = HttpMockSequence(
1580 ({"status": "200", "location": "http://upload.example.com"}, ""),
1584 "location": "http://upload.example.com/2",
1592 status, body = request.next_chunk(http=http)
1600 self.http = HttpMock(datafile("tasks.json"), {"status": "200"})
1601 tasks = build("tasks", "v1", http=self.http)
1606 self.http = HttpMock(datafile("tasks.json"), {"status": "200"})
1607 tasks = build("tasks", "v1", http=self.http)
1613 self.http = HttpMock(datafile("tasks.json"), {"status": "200"})
1614 tasks = build("tasks", "v1", http=self.http)
1622 self.http = HttpMock(datafile("bigquery.json"), {"status": "200"})
1623 bigquery = build("bigquery", "v2", http=self.http)
1631 self.http = HttpMock(datafile("logging.json"), {"status": "200"})
1632 logging = build("logging", "v2", http=self.http)
1639 self.http = HttpMock(datafile("latitude.json"), {"status": "200"})
1640 service = build("latitude", "v1", http=self.http)
1644 self.http = HttpMock(datafile("drive.json"), {"status": "200"})
1645 drive = build("drive", "v3", http=self.http)
1650 self.http = HttpMock(datafile("drive.json"), {"status": "200"})
1651 drive = build("drive", "v3", http=self.http)
1661 http = HttpMock(datafile("zoo.json"), {"status": "200"})
1662 zoo = build("zoo", "v1", http=http)
1670 http = HttpMockSequence([({"status": "200"}, "standing in for media")])
1671 response = request.execute(http=http)