@@ -271,7 +271,7 @@ def test_get_service_account_email_wo_project(self):
271271 ]
272272 )
273273 http .request .assert_called_once_with (
274- method = "GET" , url = URI , data = None , headers = mock .ANY
274+ method = "GET" , url = URI , data = None , headers = mock .ANY , timeout = mock . ANY
275275 )
276276
277277 def test_get_service_account_email_w_project (self ):
@@ -297,7 +297,7 @@ def test_get_service_account_email_w_project(self):
297297 ]
298298 )
299299 http .request .assert_called_once_with (
300- method = "GET" , url = URI , data = None , headers = mock .ANY
300+ method = "GET" , url = URI , data = None , headers = mock .ANY , timeout = mock . ANY
301301 )
302302
303303 def test_bucket (self ):
@@ -366,7 +366,7 @@ def test_get_bucket_with_string_miss(self):
366366 client .get_bucket (NONESUCH )
367367
368368 http .request .assert_called_once_with (
369- method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY
369+ method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
370370 )
371371
372372 def test_get_bucket_with_string_hit (self ):
@@ -396,7 +396,7 @@ def test_get_bucket_with_string_hit(self):
396396 self .assertIsInstance (bucket , Bucket )
397397 self .assertEqual (bucket .name , BUCKET_NAME )
398398 http .request .assert_called_once_with (
399- method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY
399+ method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
400400 )
401401
402402 def test_get_bucket_with_object_miss (self ):
@@ -427,7 +427,7 @@ def test_get_bucket_with_object_miss(self):
427427 client .get_bucket (bucket_obj )
428428
429429 http .request .assert_called_once_with (
430- method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY
430+ method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
431431 )
432432
433433 def test_get_bucket_with_object_hit (self ):
@@ -458,7 +458,7 @@ def test_get_bucket_with_object_hit(self):
458458 self .assertIsInstance (bucket , Bucket )
459459 self .assertEqual (bucket .name , bucket_name )
460460 http .request .assert_called_once_with (
461- method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY
461+ method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
462462 )
463463
464464 def test_lookup_bucket_miss (self ):
@@ -485,7 +485,7 @@ def test_lookup_bucket_miss(self):
485485
486486 self .assertIsNone (bucket )
487487 http .request .assert_called_once_with (
488- method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY
488+ method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
489489 )
490490
491491 def test_lookup_bucket_hit (self ):
@@ -514,7 +514,7 @@ def test_lookup_bucket_hit(self):
514514 self .assertIsInstance (bucket , Bucket )
515515 self .assertEqual (bucket .name , BUCKET_NAME )
516516 http .request .assert_called_once_with (
517- method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY
517+ method = "GET" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
518518 )
519519
520520 def test_create_bucket_w_missing_client_project (self ):
@@ -666,7 +666,7 @@ def test_create_bucket_w_string_success(self):
666666 self .assertEqual (bucket .name , bucket_name )
667667 self .assertTrue (bucket .requester_pays )
668668 http .request .assert_called_once_with (
669- method = "POST" , url = URI , data = mock .ANY , headers = mock .ANY
669+ method = "POST" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
670670 )
671671 json_sent = http .request .call_args_list [0 ][1 ]["data" ]
672672 self .assertEqual (json_expected , json .loads (json_sent ))
@@ -706,7 +706,7 @@ def test_create_bucket_w_object_success(self):
706706 self .assertEqual (bucket .name , bucket_name )
707707 self .assertTrue (bucket .requester_pays )
708708 http .request .assert_called_once_with (
709- method = "POST" , url = URI , data = mock .ANY , headers = mock .ANY
709+ method = "POST" , url = URI , data = mock .ANY , headers = mock .ANY , timeout = mock . ANY
710710 )
711711 json_sent = http .request .call_args_list [0 ][1 ]["data" ]
712712 self .assertEqual (json_expected , json .loads (json_sent ))
@@ -848,7 +848,11 @@ def test_list_buckets_empty(self):
848848 self .assertEqual (len (buckets ), 0 )
849849
850850 http .request .assert_called_once_with (
851- method = "GET" , url = mock .ANY , data = mock .ANY , headers = mock .ANY
851+ method = "GET" ,
852+ url = mock .ANY ,
853+ data = mock .ANY ,
854+ headers = mock .ANY ,
855+ timeout = mock .ANY ,
852856 )
853857
854858 requested_url = http .request .mock_calls [0 ][2 ]["url" ]
@@ -883,7 +887,11 @@ def test_list_buckets_explicit_project(self):
883887 self .assertEqual (len (buckets ), 0 )
884888
885889 http .request .assert_called_once_with (
886- method = "GET" , url = mock .ANY , data = mock .ANY , headers = mock .ANY
890+ method = "GET" ,
891+ url = mock .ANY ,
892+ data = mock .ANY ,
893+ headers = mock .ANY ,
894+ timeout = mock .ANY ,
887895 )
888896
889897 requested_url = http .request .mock_calls [0 ][2 ]["url" ]
@@ -918,7 +926,11 @@ def test_list_buckets_non_empty(self):
918926 self .assertEqual (buckets [0 ].name , BUCKET_NAME )
919927
920928 http .request .assert_called_once_with (
921- method = "GET" , url = mock .ANY , data = mock .ANY , headers = mock .ANY
929+ method = "GET" ,
930+ url = mock .ANY ,
931+ data = mock .ANY ,
932+ headers = mock .ANY ,
933+ timeout = mock .ANY ,
922934 )
923935
924936 def test_list_buckets_all_arguments (self ):
@@ -948,7 +960,11 @@ def test_list_buckets_all_arguments(self):
948960 buckets = list (iterator )
949961 self .assertEqual (buckets , [])
950962 http .request .assert_called_once_with (
951- method = "GET" , url = mock .ANY , data = mock .ANY , headers = mock .ANY
963+ method = "GET" ,
964+ url = mock .ANY ,
965+ data = mock .ANY ,
966+ headers = mock .ANY ,
967+ timeout = mock .ANY ,
952968 )
953969
954970 requested_url = http .request .mock_calls [0 ][2 ]["url" ]
@@ -1077,7 +1093,7 @@ def _create_hmac_key_helper(self, explicit_project=None, user_project=None):
10771093
10781094 FULL_URI = "{}?{}" .format (URI , urlencode (qs_params ))
10791095 http .request .assert_called_once_with (
1080- method = "POST" , url = FULL_URI , data = None , headers = mock .ANY
1096+ method = "POST" , url = FULL_URI , data = None , headers = mock .ANY , timeout = mock . ANY
10811097 )
10821098
10831099 def test_create_hmac_key_defaults (self ):
@@ -1112,7 +1128,7 @@ def test_list_hmac_keys_defaults_empty(self):
11121128 ]
11131129 )
11141130 http .request .assert_called_once_with (
1115- method = "GET" , url = URI , data = None , headers = mock .ANY
1131+ method = "GET" , url = URI , data = None , headers = mock .ANY , timeout = mock . ANY
11161132 )
11171133
11181134 def test_list_hmac_keys_explicit_non_empty (self ):
@@ -1176,7 +1192,7 @@ def test_list_hmac_keys_explicit_non_empty(self):
11761192 "userProject" : USER_PROJECT ,
11771193 }
11781194 http .request .assert_called_once_with (
1179- method = "GET" , url = mock .ANY , data = None , headers = mock .ANY
1195+ method = "GET" , url = mock .ANY , data = None , headers = mock .ANY , timeout = mock . ANY
11801196 )
11811197 kwargs = http .request .mock_calls [0 ].kwargs
11821198 uri = kwargs ["url" ]
@@ -1223,7 +1239,7 @@ def test_get_hmac_key_metadata_wo_project(self):
12231239 ]
12241240 )
12251241 http .request .assert_called_once_with (
1226- method = "GET" , url = URI , data = None , headers = mock .ANY
1242+ method = "GET" , url = URI , data = None , headers = mock .ANY , timeout = mock . ANY
12271243 )
12281244
12291245 def test_get_hmac_key_metadata_w_project (self ):
@@ -1273,5 +1289,5 @@ def test_get_hmac_key_metadata_w_project(self):
12731289 FULL_URI = "{}?{}" .format (URI , urlencode (qs_params ))
12741290
12751291 http .request .assert_called_once_with (
1276- method = "GET" , url = FULL_URI , data = None , headers = mock .ANY
1292+ method = "GET" , url = FULL_URI , data = None , headers = mock .ANY , timeout = mock . ANY
12771293 )
0 commit comments