FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
google-api-python-client/tests/test_discovery.py at master · edson-github/google-api-python-client · GitHub
edson-github
/
google-api-python-client
Public
forked from
googleapis/google-api-python-client
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
google-api-python-client
/
tests
/
test_discovery.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
2200 lines (1858 loc) · 83.9 KB
Breadcrumbs
google-api-python-client
/
tests
/
test_discovery.py
Copy path
File metadata and controls
2200 lines (1858 loc) · 83.9 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Discovery document tests
Unit tests for objects created from discovery documents.
"""
from
__future__
import
absolute_import
import
six
__author__
=
"jcgregorio@google.com (Joe Gregorio)"
from
six
import
BytesIO
,
StringIO
from
six
.
moves
.
urllib
.
parse
import
urlparse
,
parse_qs
import
copy
import
datetime
import
httplib2
import
itertools
import
json
import
os
import
pickle
import
re
import
sys
import
unittest2
as
unittest
from
collections
import
defaultdict
from
parameterized
import
parameterized
import
mock
import
google
.
auth
.
credentials
from
google
.
auth
.
transport
import
mtls
from
google
.
auth
.
exceptions
import
MutualTLSChannelError
import
google_auth_httplib2
import
google
.
api_core
.
exceptions
from
googleapiclient
.
discovery
import
_fix_up_media_upload
from
googleapiclient
.
discovery
import
_fix_up_method_description
from
googleapiclient
.
discovery
import
_fix_up_parameters
from
googleapiclient
.
discovery
import
_urljoin
from
googleapiclient
.
discovery
import
build
from
googleapiclient
.
discovery
import
build_from_document
from
googleapiclient
.
discovery
import
DISCOVERY_URI
from
googleapiclient
.
discovery
import
key2param
from
googleapiclient
.
discovery
import
MEDIA_BODY_PARAMETER_DEFAULT_VALUE
from
googleapiclient
.
discovery
import
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE
from
googleapiclient
.
discovery
import
ResourceMethodParameters
from
googleapiclient
.
discovery
import
STACK_QUERY_PARAMETERS
from
googleapiclient
.
discovery
import
STACK_QUERY_PARAMETER_DEFAULT_VALUE
from
googleapiclient
.
discovery
import
V1_DISCOVERY_URI
from
googleapiclient
.
discovery
import
V2_DISCOVERY_URI
from
googleapiclient
.
discovery_cache
import
DISCOVERY_DOC_MAX_AGE
from
googleapiclient
.
discovery_cache
.
base
import
Cache
from
googleapiclient
.
errors
import
HttpError
from
googleapiclient
.
errors
import
InvalidJsonError
from
googleapiclient
.
errors
import
MediaUploadSizeError
from
googleapiclient
.
errors
import
ResumableUploadError
from
googleapiclient
.
errors
import
UnacceptableMimeTypeError
from
googleapiclient
.
errors
import
UnknownApiNameOrVersion
from
googleapiclient
.
errors
import
UnknownFileType
from
googleapiclient
.
http
import
build_http
from
googleapiclient
.
http
import
BatchHttpRequest
from
googleapiclient
.
http
import
HttpMock
from
googleapiclient
.
http
import
HttpMockSequence
from
googleapiclient
.
http
import
MediaFileUpload
from
googleapiclient
.
http
import
MediaIoBaseUpload
from
googleapiclient
.
http
import
MediaUpload
from
googleapiclient
.
http
import
MediaUploadProgress
from
googleapiclient
.
http
import
tunnel_patch
from
googleapiclient
.
model
import
JsonModel
from
googleapiclient
.
schema
import
Schemas
from
oauth2client
import
GOOGLE_TOKEN_URI
from
oauth2client
.
client
import
OAuth2Credentials
,
GoogleCredentials
from
googleapiclient
import
_helpers
as
util
import
uritemplate
DATA_DIR
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"data"
)
def
assertUrisEqual
(
testcase
,
expected
,
actual
):
"""Test that URIs are the same, up to reordering of query parameters."""
expected
=
urlparse
(
expected
)
actual
=
urlparse
(
actual
)
testcase
.
assertEqual
(
expected
.
scheme
,
actual
.
scheme
)
testcase
.
assertEqual
(
expected
.
netloc
,
actual
.
netloc
)
testcase
.
assertEqual
(
expected
.
path
,
actual
.
path
)
testcase
.
assertEqual
(
expected
.
params
,
actual
.
params
)
testcase
.
assertEqual
(
expected
.
fragment
,
actual
.
fragment
)
expected_query
=
parse_qs
(
expected
.
query
)
actual_query
=
parse_qs
(
actual
.
query
)
for
name
in
list
(
expected_query
.
keys
()):
testcase
.
assertEqual
(
expected_query
[
name
],
actual_query
[
name
])
for
name
in
list
(
actual_query
.
keys
()):
testcase
.
assertEqual
(
expected_query
[
name
],
actual_query
[
name
])
def
assert_discovery_uri
(
testcase
,
actual
,
service_name
,
version
,
discovery
):
"""Assert that discovery URI used was the one that was expected
for a given service and version."""
params
=
{
"api"
:
service_name
,
"apiVersion"
:
version
}
expanded_requested_uri
=
uritemplate
.
expand
(
discovery
,
params
)
assertUrisEqual
(
testcase
,
expanded_requested_uri
,
actual
)
def
validate_discovery_requests
(
testcase
,
http_mock
,
service_name
,
version
,
discovery
):
"""Validates that there have > 0 calls to Http Discovery
and that LAST discovery URI used was the one that was expected
for a given service and version."""
testcase
.
assertTrue
(
len
(
http_mock
.
request_sequence
)
>
0
)
if
len
(
http_mock
.
request_sequence
)
>
0
:
actual_uri
=
http_mock
.
request_sequence
[
-
1
][
0
]
assert_discovery_uri
(
testcase
,
actual_uri
,
service_name
,
version
,
discovery
)
def
datafile
(
filename
):
return
os
.
path
.
join
(
DATA_DIR
,
filename
)
def
read_datafile
(
filename
,
mode
=
"r"
):
with
open
(
datafile
(
filename
),
mode
=
mode
)
as
f
:
return
f
.
read
()
class
SetupHttplib2
(
unittest
.
TestCase
):
def
test_retries
(
self
):
# Merely loading googleapiclient.discovery should set the RETRIES to 1.
self
.
assertEqual
(
1
,
httplib2
.
RETRIES
)
class
Utilities
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
zoo_root_desc
=
json
.
loads
(
read_datafile
(
"zoo.json"
,
"r"
))
self
.
zoo_get_method_desc
=
self
.
zoo_root_desc
[
"methods"
][
"query"
]
self
.
zoo_animals_resource
=
self
.
zoo_root_desc
[
"resources"
][
"animals"
]
self
.
zoo_insert_method_desc
=
self
.
zoo_animals_resource
[
"methods"
][
"insert"
]
self
.
zoo_schema
=
Schemas
(
self
.
zoo_root_desc
)
def
test_key2param
(
self
):
self
.
assertEqual
(
"max_results"
,
key2param
(
"max-results"
))
self
.
assertEqual
(
"x007_bond"
,
key2param
(
"007-bond"
))
def
_base_fix_up_parameters_test
(
self
,
method_desc
,
http_method
,
root_desc
,
schema
):
self
.
assertEqual
(
method_desc
[
"httpMethod"
],
http_method
)
method_desc_copy
=
copy
.
deepcopy
(
method_desc
)
self
.
assertEqual
(
method_desc
,
method_desc_copy
)
parameters
=
_fix_up_parameters
(
method_desc_copy
,
root_desc
,
http_method
,
schema
)
self
.
assertNotEqual
(
method_desc
,
method_desc_copy
)
for
param_name
in
STACK_QUERY_PARAMETERS
:
self
.
assertEqual
(
STACK_QUERY_PARAMETER_DEFAULT_VALUE
,
parameters
[
param_name
]
)
for
param_name
,
value
in
six
.
iteritems
(
root_desc
.
get
(
"parameters"
, {})):
self
.
assertEqual
(
value
,
parameters
[
param_name
])
return
parameters
def
test_fix_up_parameters_get
(
self
):
parameters
=
self
.
_base_fix_up_parameters_test
(
self
.
zoo_get_method_desc
,
"GET"
,
self
.
zoo_root_desc
,
self
.
zoo_schema
)
# Since http_method is 'GET'
self
.
assertFalse
(
"body"
in
parameters
)
def
test_fix_up_parameters_insert
(
self
):
parameters
=
self
.
_base_fix_up_parameters_test
(
self
.
zoo_insert_method_desc
,
"POST"
,
self
.
zoo_root_desc
,
self
.
zoo_schema
)
body
=
{
"description"
:
"The request body."
,
"type"
:
"object"
,
"$ref"
:
"Animal"
}
self
.
assertEqual
(
parameters
[
"body"
],
body
)
def
test_fix_up_parameters_check_body
(
self
):
dummy_root_desc
=
{}
dummy_schema
=
{
"Request"
: {
"properties"
: {
"description"
:
"Required. Dummy parameter."
,
"type"
:
"string"
,
}
}
}
no_payload_http_method
=
"DELETE"
with_payload_http_method
=
"PUT"
invalid_method_desc
=
{
"response"
:
"Who cares"
}
valid_method_desc
=
{
"request"
: {
"key1"
:
"value1"
,
"key2"
:
"value2"
,
"$ref"
:
"Request"
}
}
parameters
=
_fix_up_parameters
(
invalid_method_desc
,
dummy_root_desc
,
no_payload_http_method
,
dummy_schema
)
self
.
assertFalse
(
"body"
in
parameters
)
parameters
=
_fix_up_parameters
(
valid_method_desc
,
dummy_root_desc
,
no_payload_http_method
,
dummy_schema
)
self
.
assertFalse
(
"body"
in
parameters
)
parameters
=
_fix_up_parameters
(
invalid_method_desc
,
dummy_root_desc
,
with_payload_http_method
,
dummy_schema
)
self
.
assertFalse
(
"body"
in
parameters
)
parameters
=
_fix_up_parameters
(
valid_method_desc
,
dummy_root_desc
,
with_payload_http_method
,
dummy_schema
)
body
=
{
"description"
:
"The request body."
,
"type"
:
"object"
,
"$ref"
:
"Request"
,
"key1"
:
"value1"
,
"key2"
:
"value2"
,
}
self
.
assertEqual
(
parameters
[
"body"
],
body
)
def
test_fix_up_parameters_optional_body
(
self
):
# Request with no parameters
dummy_schema
=
{
"Request"
: {
"properties"
: {}}}
method_desc
=
{
"request"
: {
"$ref"
:
"Request"
}}
parameters
=
_fix_up_parameters
(
method_desc
, {},
"POST"
,
dummy_schema
)
def
_base_fix_up_method_description_test
(
self
,
method_desc
,
initial_parameters
,
final_parameters
,
final_accept
,
final_max_size
,
final_media_path_url
,
):
fake_root_desc
=
{
"rootUrl"
:
"http://root/"
,
"servicePath"
:
"fake/"
,
"mtlsRootUrl"
:
"http://root/"
,
}
fake_path_url
=
"fake-path/"
accept
,
max_size
,
media_path_url
=
_fix_up_media_upload
(
method_desc
,
fake_root_desc
,
fake_path_url
,
initial_parameters
)
self
.
assertEqual
(
accept
,
final_accept
)
self
.
assertEqual
(
max_size
,
final_max_size
)
self
.
assertEqual
(
media_path_url
,
final_media_path_url
)
self
.
assertEqual
(
initial_parameters
,
final_parameters
)
def
test_fix_up_media_upload_no_initial_invalid
(
self
):
invalid_method_desc
=
{
"response"
:
"Who cares"
}
self
.
_base_fix_up_method_description_test
(
invalid_method_desc
, {}, {}, [],
0
,
None
)
def
test_fix_up_media_upload_no_initial_valid_minimal
(
self
):
valid_method_desc
=
{
"mediaUpload"
: {
"accept"
: []}}
final_parameters
=
{
"media_body"
:
MEDIA_BODY_PARAMETER_DEFAULT_VALUE
,
"media_mime_type"
:
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE
,
}
self
.
_base_fix_up_method_description_test
(
valid_method_desc
,
{},
final_parameters
,
[],
0
,
"http://root/upload/fake/fake-path/"
,
)
def
test_fix_up_media_upload_no_initial_valid_full
(
self
):
valid_method_desc
=
{
"mediaUpload"
: {
"accept"
: [
"*/*"
],
"maxSize"
:
"10GB"
}}
final_parameters
=
{
"media_body"
:
MEDIA_BODY_PARAMETER_DEFAULT_VALUE
,
"media_mime_type"
:
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE
,
}
ten_gb
=
10
*
2
**
30
self
.
_base_fix_up_method_description_test
(
valid_method_desc
,
{},
final_parameters
,
[
"*/*"
],
ten_gb
,
"http://root/upload/fake/fake-path/"
,
)
def
test_fix_up_media_upload_with_initial_invalid
(
self
):
invalid_method_desc
=
{
"response"
:
"Who cares"
}
initial_parameters
=
{
"body"
: {}}
self
.
_base_fix_up_method_description_test
(
invalid_method_desc
,
initial_parameters
,
initial_parameters
, [],
0
,
None
)
def
test_fix_up_media_upload_with_initial_valid_minimal
(
self
):
valid_method_desc
=
{
"mediaUpload"
: {
"accept"
: []}}
initial_parameters
=
{
"body"
: {}}
final_parameters
=
{
"body"
: {},
"media_body"
:
MEDIA_BODY_PARAMETER_DEFAULT_VALUE
,
"media_mime_type"
:
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE
,
}
self
.
_base_fix_up_method_description_test
(
valid_method_desc
,
initial_parameters
,
final_parameters
,
[],
0
,
"http://root/upload/fake/fake-path/"
,
)
def
test_fix_up_media_upload_with_initial_valid_full
(
self
):
valid_method_desc
=
{
"mediaUpload"
: {
"accept"
: [
"*/*"
],
"maxSize"
:
"10GB"
}}
initial_parameters
=
{
"body"
: {}}
final_parameters
=
{
"body"
: {},
"media_body"
:
MEDIA_BODY_PARAMETER_DEFAULT_VALUE
,
"media_mime_type"
:
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE
,
}
ten_gb
=
10
*
2
**
30
self
.
_base_fix_up_method_description_test
(
valid_method_desc
,
initial_parameters
,
final_parameters
,
[
"*/*"
],
ten_gb
,
"http://root/upload/fake/fake-path/"
,
)
def
test_fix_up_method_description_get
(
self
):
result
=
_fix_up_method_description
(
self
.
zoo_get_method_desc
,
self
.
zoo_root_desc
,
self
.
zoo_schema
)
path_url
=
"query"
http_method
=
"GET"
method_id
=
"bigquery.query"
accept
=
[]
max_size
=
0
media_path_url
=
None
self
.
assertEqual
(
result
, (
path_url
,
http_method
,
method_id
,
accept
,
max_size
,
media_path_url
)
)
def
test_fix_up_method_description_insert
(
self
):
result
=
_fix_up_method_description
(
self
.
zoo_insert_method_desc
,
self
.
zoo_root_desc
,
self
.
zoo_schema
)
path_url
=
"animals"
http_method
=
"POST"
method_id
=
"zoo.animals.insert"
accept
=
[
"image/png"
]
max_size
=
1024
media_path_url
=
"https://www.googleapis.com/upload/zoo/v1/animals"
self
.
assertEqual
(
result
, (
path_url
,
http_method
,
method_id
,
accept
,
max_size
,
media_path_url
)
)
def
test_urljoin
(
self
):
# We want to exhaustively test various URL combinations.
simple_bases
=
[
"https://www.googleapis.com"
,
"https://www.googleapis.com/"
]
long_urls
=
[
"foo/v1/bar:custom?alt=json"
,
"/foo/v1/bar:custom?alt=json"
]
long_bases
=
[
"https://www.googleapis.com/foo/v1"
,
"https://www.googleapis.com/foo/v1/"
,
]
simple_urls
=
[
"bar:custom?alt=json"
,
"/bar:custom?alt=json"
]
final_url
=
"https://www.googleapis.com/foo/v1/bar:custom?alt=json"
for
base
,
url
in
itertools
.
product
(
simple_bases
,
long_urls
):
self
.
assertEqual
(
final_url
,
_urljoin
(
base
,
url
))
for
base
,
url
in
itertools
.
product
(
long_bases
,
simple_urls
):
self
.
assertEqual
(
final_url
,
_urljoin
(
base
,
url
))
def
test_ResourceMethodParameters_zoo_get
(
self
):
parameters
=
ResourceMethodParameters
(
self
.
zoo_get_method_desc
)
param_types
=
{
"a"
:
"any"
,
"b"
:
"boolean"
,
"e"
:
"string"
,
"er"
:
"string"
,
"i"
:
"integer"
,
"n"
:
"number"
,
"o"
:
"object"
,
"q"
:
"string"
,
"rr"
:
"string"
,
}
keys
=
list
(
param_types
.
keys
())
self
.
assertEqual
(
parameters
.
argmap
,
dict
((
key
,
key
)
for
key
in
keys
))
self
.
assertEqual
(
parameters
.
required_params
, [])
self
.
assertEqual
(
sorted
(
parameters
.
repeated_params
), [
"er"
,
"rr"
])
self
.
assertEqual
(
parameters
.
pattern_params
, {
"rr"
:
"[a-z]+"
})
self
.
assertEqual
(
sorted
(
parameters
.
query_params
),
[
"a"
,
"b"
,
"e"
,
"er"
,
"i"
,
"n"
,
"o"
,
"q"
,
"rr"
],
)
self
.
assertEqual
(
parameters
.
path_params
,
set
())
self
.
assertEqual
(
parameters
.
param_types
,
param_types
)
enum_params
=
{
"e"
: [
"foo"
,
"bar"
],
"er"
: [
"one"
,
"two"
,
"three"
]}
self
.
assertEqual
(
parameters
.
enum_params
,
enum_params
)
def
test_ResourceMethodParameters_zoo_animals_patch
(
self
):
method_desc
=
self
.
zoo_animals_resource
[
"methods"
][
"patch"
]
parameters
=
ResourceMethodParameters
(
method_desc
)
param_types
=
{
"name"
:
"string"
}
keys
=
list
(
param_types
.
keys
())
self
.
assertEqual
(
parameters
.
argmap
,
dict
((
key
,
key
)
for
key
in
keys
))
self
.
assertEqual
(
parameters
.
required_params
, [
"name"
])
self
.
assertEqual
(
parameters
.
repeated_params
, [])
self
.
assertEqual
(
parameters
.
pattern_params
, {})
self
.
assertEqual
(
parameters
.
query_params
, [])
self
.
assertEqual
(
parameters
.
path_params
,
set
([
"name"
]))
self
.
assertEqual
(
parameters
.
param_types
,
param_types
)
self
.
assertEqual
(
parameters
.
enum_params
, {})
class
Discovery
(
unittest
.
TestCase
):
def
test_discovery_http_is_closed
(
self
):
http
=
HttpMock
(
datafile
(
"malformed.json"
), {
"status"
:
"200"
})
service
=
build
(
"plus"
,
"v1"
,
credentials
=
mock
.
sentinel
.
credentials
)
http
.
close
.
assert_called_once
()
class
DiscoveryErrors
(
unittest
.
TestCase
):
def
test_tests_should_be_run_with_strict_positional_enforcement
(
self
):
try
:
plus
=
build
(
"plus"
,
"v1"
,
None
,
static_discovery
=
False
)
self
.
fail
(
"should have raised a TypeError exception over missing http=."
)
except
TypeError
:
pass
def
test_failed_to_parse_discovery_json
(
self
):
self
.
http
=
HttpMock
(
datafile
(
"malformed.json"
), {
"status"
:
"200"
})
try
:
plus
=
build
(
"plus"
,
"v1"
,
http
=
self
.
http
,
cache_discovery
=
False
,
static_discovery
=
False
)
self
.
fail
(
"should have raised an exception over malformed JSON."
)
except
InvalidJsonError
:
pass
def
test_unknown_api_name_or_version
(
self
):
http
=
HttpMockSequence
(
[
({
"status"
:
"404"
},
read_datafile
(
"zoo.json"
,
"rb"
)),
({
"status"
:
"404"
},
read_datafile
(
"zoo.json"
,
"rb"
)),
]
)
with
self
.
assertRaises
(
UnknownApiNameOrVersion
):
plus
=
build
(
"plus"
,
"v1"
,
http
=
http
,
cache_discovery
=
False
)
def
test_credentials_and_http_mutually_exclusive
(
self
):
http
=
HttpMock
(
datafile
(
"plus.json"
), {
"status"
:
"200"
})
with
self
.
assertRaises
(
ValueError
):
build
(
"plus"
,
"v1"
,
http
=
http
,
credentials
=
mock
.
sentinel
.
credentials
,
static_discovery
=
False
)
def
test_credentials_file_and_http_mutually_exclusive
(
self
):
http
=
HttpMock
(
datafile
(
"plus.json"
), {
"status"
:
"200"
})
with
self
.
assertRaises
(
ValueError
):
build
(
"plus"
,
"v1"
,
http
=
http
,
client_options
=
google
.
api_core
.
client_options
.
ClientOptions
(
credentials_file
=
"credentials.json"
),
static_discovery
=
False
,
)
def
test_credentials_and_credentials_file_mutually_exclusive
(
self
):
with
self
.
assertRaises
(
google
.
api_core
.
exceptions
.
DuplicateCredentialArgs
):
build
(
"plus"
,
"v1"
,
credentials
=
mock
.
sentinel
.
credentials
,
client_options
=
google
.
api_core
.
client_options
.
ClientOptions
(
credentials_file
=
"credentials.json"
),
static_discovery
=
False
,
)
class
DiscoveryFromDocument
(
unittest
.
TestCase
):
MOCK_CREDENTIALS
=
mock
.
Mock
(
spec
=
google
.
auth
.
credentials
.
Credentials
)
def
test_can_build_from_local_document
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
credentials
=
self
.
MOCK_CREDENTIALS
,
)
self
.
assertIsNotNone
(
plus
)
self
.
assertTrue
(
hasattr
(
plus
,
"activities"
))
def
test_can_build_from_local_deserialized_document
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
discovery
=
json
.
loads
(
discovery
)
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
credentials
=
self
.
MOCK_CREDENTIALS
,
)
self
.
assertIsNotNone
(
plus
)
self
.
assertTrue
(
hasattr
(
plus
,
"activities"
))
def
test_building_with_base_remembers_base
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
base
=
"https://www.example.com/"
plus
=
build_from_document
(
discovery
,
base
=
base
,
credentials
=
self
.
MOCK_CREDENTIALS
)
self
.
assertEqual
(
"https://www.googleapis.com/plus/v1/"
,
plus
.
_baseUrl
)
def
test_building_with_optional_http_with_authorization
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
credentials
=
self
.
MOCK_CREDENTIALS
,
)
# plus service requires Authorization, hence we expect to see AuthorizedHttp object here
self
.
assertIsInstance
(
plus
.
_http
,
google_auth_httplib2
.
AuthorizedHttp
)
self
.
assertIsInstance
(
plus
.
_http
.
http
,
httplib2
.
Http
)
self
.
assertIsInstance
(
plus
.
_http
.
http
.
timeout
,
int
)
self
.
assertGreater
(
plus
.
_http
.
http
.
timeout
,
0
)
def
test_building_with_optional_http_with_no_authorization
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
# Cleanup auth field, so we would use plain http client
discovery
=
json
.
loads
(
discovery
)
discovery
[
"auth"
]
=
{}
discovery
=
json
.
dumps
(
discovery
)
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
credentials
=
None
)
# plus service requires Authorization
self
.
assertIsInstance
(
plus
.
_http
,
httplib2
.
Http
)
self
.
assertIsInstance
(
plus
.
_http
.
timeout
,
int
)
self
.
assertGreater
(
plus
.
_http
.
timeout
,
0
)
def
test_building_with_explicit_http
(
self
):
http
=
HttpMock
()
discovery
=
read_datafile
(
"plus.json"
)
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
http
=
http
)
self
.
assertEqual
(
plus
.
_http
,
http
)
def
test_building_with_developer_key_skips_adc
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
developerKey
=
"123"
)
self
.
assertIsInstance
(
plus
.
_http
,
httplib2
.
Http
)
# It should not be an AuthorizedHttp, because that would indicate that
# application default credentials were used.
self
.
assertNotIsInstance
(
plus
.
_http
,
google_auth_httplib2
.
AuthorizedHttp
)
def
test_building_with_context_manager
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
(
"httplib2.Http"
)
as
http
:
with
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
credentials
=
self
.
MOCK_CREDENTIALS
)
as
plus
:
self
.
assertIsNotNone
(
plus
)
self
.
assertTrue
(
hasattr
(
plus
,
"activities"
))
plus
.
_http
.
http
.
close
.
assert_called_once
()
def
test_resource_close
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
(
"httplib2.Http"
)
as
http
:
plus
=
build_from_document
(
discovery
,
base
=
"https://www.googleapis.com/"
,
credentials
=
self
.
MOCK_CREDENTIALS
,
)
plus
.
close
()
plus
.
_http
.
http
.
close
.
assert_called_once
()
def
test_api_endpoint_override_from_client_options
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
api_endpoint
=
"https://foo.googleapis.com/"
options
=
google
.
api_core
.
client_options
.
ClientOptions
(
api_endpoint
=
api_endpoint
)
plus
=
build_from_document
(
discovery
,
client_options
=
options
,
credentials
=
self
.
MOCK_CREDENTIALS
)
self
.
assertEqual
(
plus
.
_baseUrl
,
api_endpoint
)
def
test_api_endpoint_override_from_client_options_mapping_object
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
api_endpoint
=
"https://foo.googleapis.com/"
mapping_object
=
defaultdict
(
str
)
mapping_object
[
"api_endpoint"
]
=
api_endpoint
plus
=
build_from_document
(
discovery
,
client_options
=
mapping_object
)
self
.
assertEqual
(
plus
.
_baseUrl
,
api_endpoint
)
def
test_api_endpoint_override_from_client_options_dict
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
api_endpoint
=
"https://foo.googleapis.com/"
plus
=
build_from_document
(
discovery
,
client_options
=
{
"api_endpoint"
:
api_endpoint
},
credentials
=
self
.
MOCK_CREDENTIALS
,
)
self
.
assertEqual
(
plus
.
_baseUrl
,
api_endpoint
)
def
test_scopes_from_client_options
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
(
"googleapiclient._auth.default_credentials"
)
as
default
:
plus
=
build_from_document
(
discovery
,
client_options
=
{
"scopes"
: [
"1"
,
"2"
]},
)
default
.
assert_called_once_with
(
scopes
=
[
"1"
,
"2"
],
quota_project_id
=
None
)
def
test_quota_project_from_client_options
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
(
"googleapiclient._auth.default_credentials"
)
as
default
:
plus
=
build_from_document
(
discovery
,
client_options
=
google
.
api_core
.
client_options
.
ClientOptions
(
quota_project_id
=
"my-project"
),
)
default
.
assert_called_once_with
(
scopes
=
None
,
quota_project_id
=
"my-project"
)
def
test_credentials_file_from_client_options
(
self
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
(
"googleapiclient._auth.credentials_from_file"
)
as
default
:
plus
=
build_from_document
(
discovery
,
client_options
=
google
.
api_core
.
client_options
.
ClientOptions
(
credentials_file
=
"credentials.json"
),
)
default
.
assert_called_once_with
(
"credentials.json"
,
scopes
=
None
,
quota_project_id
=
None
)
REGULAR_ENDPOINT
=
"https://www.googleapis.com/plus/v1/"
MTLS_ENDPOINT
=
"https://www.mtls.googleapis.com/plus/v1/"
class
DiscoveryFromDocumentMutualTLS
(
unittest
.
TestCase
):
MOCK_CREDENTIALS
=
mock
.
Mock
(
spec
=
google
.
auth
.
credentials
.
Credentials
)
ADC_CERT_PATH
=
"adc_cert_path"
ADC_KEY_PATH
=
"adc_key_path"
ADC_PASSPHRASE
=
"adc_passphrase"
def
check_http_client_cert
(
self
,
resource
,
has_client_cert
=
"false"
):
if
isinstance
(
resource
.
_http
,
google_auth_httplib2
.
AuthorizedHttp
):
certs
=
list
(
resource
.
_http
.
http
.
certificates
.
iter
(
""
))
else
:
certs
=
list
(
resource
.
_http
.
certificates
.
iter
(
""
))
if
has_client_cert
==
"true"
:
self
.
assertEqual
(
len
(
certs
),
1
)
self
.
assertEqual
(
certs
[
0
], (
self
.
ADC_KEY_PATH
,
self
.
ADC_CERT_PATH
,
self
.
ADC_PASSPHRASE
)
)
else
:
self
.
assertEqual
(
len
(
certs
),
0
)
def
client_encrypted_cert_source
(
self
):
return
self
.
ADC_CERT_PATH
,
self
.
ADC_KEY_PATH
,
self
.
ADC_PASSPHRASE
@
parameterized
.
expand
(
[
(
"never"
,
"true"
),
(
"auto"
,
"true"
),
(
"always"
,
"true"
),
(
"never"
,
"false"
),
(
"auto"
,
"false"
),
(
"always"
,
"false"
),
]
)
def
test_mtls_not_trigger_if_http_provided
(
self
,
use_mtls_env
,
use_client_cert
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_MTLS_ENDPOINT"
:
use_mtls_env
}
):
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_CLIENT_CERTIFICATE"
:
use_client_cert
}
):
plus
=
build_from_document
(
discovery
,
http
=
httplib2
.
Http
())
self
.
assertIsNotNone
(
plus
)
self
.
assertEqual
(
plus
.
_baseUrl
,
REGULAR_ENDPOINT
)
self
.
check_http_client_cert
(
plus
,
has_client_cert
=
"false"
)
@
parameterized
.
expand
(
[
(
"never"
,
"true"
),
(
"auto"
,
"true"
),
(
"always"
,
"true"
),
(
"never"
,
"false"
),
(
"auto"
,
"false"
),
(
"always"
,
"false"
),
]
)
def
test_exception_with_client_cert_source
(
self
,
use_mtls_env
,
use_client_cert
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_MTLS_ENDPOINT"
:
use_mtls_env
}
):
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_CLIENT_CERTIFICATE"
:
use_client_cert
}
):
with
self
.
assertRaises
(
MutualTLSChannelError
):
build_from_document
(
discovery
,
credentials
=
self
.
MOCK_CREDENTIALS
,
client_options
=
{
"client_cert_source"
:
mock
.
Mock
()},
)
@
parameterized
.
expand
(
[
(
"never"
,
"true"
,
REGULAR_ENDPOINT
),
(
"auto"
,
"true"
,
MTLS_ENDPOINT
),
(
"always"
,
"true"
,
MTLS_ENDPOINT
),
(
"never"
,
"false"
,
REGULAR_ENDPOINT
),
(
"auto"
,
"false"
,
REGULAR_ENDPOINT
),
(
"always"
,
"false"
,
MTLS_ENDPOINT
),
]
)
def
test_mtls_with_provided_client_cert
(
self
,
use_mtls_env
,
use_client_cert
,
base_url
):
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_MTLS_ENDPOINT"
:
use_mtls_env
}
):
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_CLIENT_CERTIFICATE"
:
use_client_cert
}
):
plus
=
build_from_document
(
discovery
,
credentials
=
self
.
MOCK_CREDENTIALS
,
client_options
=
{
"client_encrypted_cert_source"
:
self
.
client_encrypted_cert_source
},
)
self
.
assertIsNotNone
(
plus
)
self
.
check_http_client_cert
(
plus
,
has_client_cert
=
use_client_cert
)
self
.
assertEqual
(
plus
.
_baseUrl
,
base_url
)
@
parameterized
.
expand
(
[
(
"never"
,
"true"
),
(
"auto"
,
"true"
),
(
"always"
,
"true"
),
(
"never"
,
"false"
),
(
"auto"
,
"false"
),
(
"always"
,
"false"
),
]
)
def
test_endpoint_not_switch
(
self
,
use_mtls_env
,
use_client_cert
):
# Test endpoint is not switched if user provided api endpoint
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_MTLS_ENDPOINT"
:
use_mtls_env
}
):
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_CLIENT_CERTIFICATE"
:
use_client_cert
}
):
plus
=
build_from_document
(
discovery
,
credentials
=
self
.
MOCK_CREDENTIALS
,
client_options
=
{
"api_endpoint"
:
"https://foo.googleapis.com"
,
"client_encrypted_cert_source"
:
self
.
client_encrypted_cert_source
,
},
)
self
.
assertIsNotNone
(
plus
)
self
.
check_http_client_cert
(
plus
,
has_client_cert
=
use_client_cert
)
self
.
assertEqual
(
plus
.
_baseUrl
,
"https://foo.googleapis.com"
)
@
parameterized
.
expand
(
[
(
"never"
,
"true"
,
REGULAR_ENDPOINT
),
(
"auto"
,
"true"
,
MTLS_ENDPOINT
),
(
"always"
,
"true"
,
MTLS_ENDPOINT
),
(
"never"
,
"false"
,
REGULAR_ENDPOINT
),
(
"auto"
,
"false"
,
REGULAR_ENDPOINT
),
(
"always"
,
"false"
,
MTLS_ENDPOINT
),
]
)
@
mock
.
patch
(
"google.auth.transport.mtls.has_default_client_cert_source"
,
autospec
=
True
)
@
mock
.
patch
(
"google.auth.transport.mtls.default_client_encrypted_cert_source"
,
autospec
=
True
)
def
test_mtls_with_default_client_cert
(
self
,
use_mtls_env
,
use_client_cert
,
base_url
,
default_client_encrypted_cert_source
,
has_default_client_cert_source
,
):
has_default_client_cert_source
.
return_value
=
True
default_client_encrypted_cert_source
.
return_value
=
(
self
.
client_encrypted_cert_source
)
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_MTLS_ENDPOINT"
:
use_mtls_env
}
):
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_CLIENT_CERTIFICATE"
:
use_client_cert
}
):
plus
=
build_from_document
(
discovery
,
credentials
=
self
.
MOCK_CREDENTIALS
,
adc_cert_path
=
self
.
ADC_CERT_PATH
,
adc_key_path
=
self
.
ADC_KEY_PATH
,
)
self
.
assertIsNotNone
(
plus
)
self
.
check_http_client_cert
(
plus
,
has_client_cert
=
use_client_cert
)
self
.
assertEqual
(
plus
.
_baseUrl
,
base_url
)
@
parameterized
.
expand
(
[
(
"never"
,
"true"
,
REGULAR_ENDPOINT
),
(
"auto"
,
"true"
,
REGULAR_ENDPOINT
),
(
"always"
,
"true"
,
MTLS_ENDPOINT
),
(
"never"
,
"false"
,
REGULAR_ENDPOINT
),
(
"auto"
,
"false"
,
REGULAR_ENDPOINT
),
(
"always"
,
"false"
,
MTLS_ENDPOINT
),
]
)
@
mock
.
patch
(
"google.auth.transport.mtls.has_default_client_cert_source"
,
autospec
=
True
)
def
test_mtls_with_no_client_cert
(
self
,
use_mtls_env
,
use_client_cert
,
base_url
,
has_default_client_cert_source
):
has_default_client_cert_source
.
return_value
=
False
discovery
=
read_datafile
(
"plus.json"
)
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_MTLS_ENDPOINT"
:
use_mtls_env
}
):
with
mock
.
patch
.
dict
(
"os.environ"
, {
"GOOGLE_API_USE_CLIENT_CERTIFICATE"
:
use_client_cert
}
):
plus
=
build_from_document
(
discovery
,
credentials
=
self
.
MOCK_CREDENTIALS
,
adc_cert_path
=
self
.
ADC_CERT_PATH
,
adc_key_path
=
self
.
ADC_KEY_PATH
,
)
self
.
assertIsNotNone
(
plus
)
self
.
check_http_client_cert
(
plus
,
has_client_cert
=
"false"
)
self
.
assertEqual
(
plus
.
_baseUrl
,
base_url
)
class
DiscoveryFromHttp
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
old_environ
=
os
.
environ
.
copy
()
def
tearDown
(
self
):
os
.
environ
=
self
.
old_environ
def
test_userip_is_added_to_discovery_uri
(
self
):
# build() will raise an HttpError on a 400, use this to pick the request uri
# out of the raised exception.
os
.
environ
[
"REMOTE_ADDR"
]
=
"10.0.0.1"
try
:
http
=
HttpMockSequence
(
[({
"status"
:
"400"
},
read_datafile
(
"zoo.json"
,
"rb"
))]
)
zoo
=
build
(
"zoo"
,
"v1"
,
http
=
http
,
developerKey
=
None
,
discoveryServiceUrl
=
"http://example.com"
,
static_discovery
=
False
,
)
self
.
fail
(
"Should have raised an exception."
)
except
HttpError
as
e
:
self
.
assertEqual
(
e
.
uri
,
"http://example.com?userIp=10.0.0.1"
)
def
test_userip_missing_is_not_added_to_discovery_uri
(
self
):
# build() will raise an HttpError on a 400, use this to pick the request uri
# out of the raised exception.
try
:
http
=
HttpMockSequence
(
[({
"status"
:
"400"
},
read_datafile
(
"zoo.json"
,
"rb"
))]
)
zoo
=
build
(
"zoo"
,
"v1"
,
http
=
http
,
developerKey
=
None
,
discoveryServiceUrl
=
"http://example.com"
,
static_discovery
=
False
,
)
self
.
fail
(
"Should have raised an exception."
)
except
HttpError
as
e
:
self
.
assertEqual
(
e
.
uri
,
"http://example.com"
)
def
test_key_is_added_to_discovery_uri
(
self
):
# build() will raise an HttpError on a 400, use this to pick the request uri
# out of the raised exception.
try
:
http
=
HttpMockSequence
(
[({
"status"
:
"400"
},
read_datafile
(
"zoo.json"
,
"rb"
))]
)
zoo
=
build
(
"zoo"
,
"v1"
,
http
=
http
,
developerKey
=
"foo"
,
discoveryServiceUrl
=
"http://example.com"
,
static_discovery
=
False
,
)
self
.
fail
(
"Should have raised an exception."
)
except
HttpError
as
e
:
self
.
assertEqual
(
e
.
uri
,
"http://example.com?key=foo"
)
def
test_discovery_loading_from_v2_discovery_uri
(
self
):
http
=
HttpMockSequence
(
[
({
"status"
:
"404"
},
"Not found"
),
({
"status"
:
"200"
},
read_datafile
(
"zoo.json"
,
"rb"
)),
]
)
zoo
=
build
(
"zoo"
,
"v1"
,
http
=
http
,
cache_discovery
=
False
,
static_discovery
=
False
)
self
.
assertTrue
(
hasattr
(
zoo
,
"animals"
))
def
test_api_endpoint_override_from_client_options
(
self
):
http
=
HttpMockSequence
(
[
({
"status"
:
"404"
},
"Not found"
),
({
"status"
:
"200"
},
read_datafile
(
"zoo.json"
,
"rb"
)),
]
)
api_endpoint
=
"https://foo.googleapis.com/"
options
=
google
.
api_core
.
client_options
.
ClientOptions
(
api_endpoint
=
api_endpoint
)
zoo
=
build
(
"zoo"
,
"v1"
,
http
=
http
,
cache_discovery
=
False
,
client_options
=
options
,
static_discovery
=
False
)
self
.
assertEqual
(
zoo
.
_baseUrl
,
api_endpoint
)
def
test_api_endpoint_override_from_client_options_dict
(
self
):
http
=
HttpMockSequence
(
[
({
"status"
:
"404"
},
"Not found"
),
({
"status"
:
"200"
},
read_datafile
(
"zoo.json"
,
"rb"
)),
]
)
api_endpoint
=
"https://foo.googleapis.com/"
zoo
=
build
(
"zoo"
,
"v1"
,
http
=
http
,
cache_discovery
=
False
,
client_options
=
{
"api_endpoint"
:
api_endpoint
},
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL