@@ -243,7 +243,7 @@ def test_fix_up_parameters_optional_body(self):
243243 dummy_schema = {"Request" : {"properties" : {}}}
244244 method_desc = {"request" : {"$ref" : "Request" }}
245245
246- parameters = _fix_up_parameters (method_desc , {}, "POST" , dummy_schema )
246+ _fix_up_parameters (method_desc , {}, "POST" , dummy_schema )
247247
248248 def _base_fix_up_method_description_test (
249249 self ,
@@ -440,22 +440,22 @@ def test_ResourceMethodParameters_zoo_animals_patch(self):
440440class Discovery (unittest .TestCase ):
441441 def test_discovery_http_is_closed (self ):
442442 http = HttpMock (datafile ("malformed.json" ), {"status" : "200" })
443- service = build ("plus" , "v1" , credentials = mock .sentinel .credentials )
443+ build ("plus" , "v1" , credentials = mock .sentinel .credentials )
444444 http .close .assert_called_once ()
445445
446446
447447class DiscoveryErrors (unittest .TestCase ):
448448 def test_tests_should_be_run_with_strict_positional_enforcement (self ):
449449 try :
450- plus = build ("plus" , "v1" , None , static_discovery = False )
450+ build ("plus" , "v1" , None , static_discovery = False )
451451 self .fail ("should have raised a TypeError exception over missing http=." )
452452 except TypeError :
453453 pass
454454
455455 def test_failed_to_parse_discovery_json (self ):
456456 self .http = HttpMock (datafile ("malformed.json" ), {"status" : "200" })
457457 try :
458- plus = build (
458+ build (
459459 "plus" ,
460460 "v1" ,
461461 http = self .http ,
@@ -474,7 +474,7 @@ def test_unknown_api_name_or_version(self):
474474 ]
475475 )
476476 with self .assertRaises (UnknownApiNameOrVersion ):
477- plus = build ("plus" , "v1" , http = http , cache_discovery = False )
477+ build ("plus" , "v1" , http = http , cache_discovery = False )
478478
479479 def test_credentials_and_http_mutually_exclusive (self ):
480480 http = HttpMock (datafile ("plus.json" ), {"status" : "200" })
@@ -603,7 +603,7 @@ def test_building_with_context_manager(self):
603603 ) as plus :
604604 self .assertIsNotNone (plus )
605605 self .assertTrue (hasattr (plus , "activities" ))
606- plus . _http . http .close .assert_called_once ()
606+ http .close .assert_called_once ()
607607
608608 def test_resource_close (self ):
609609 discovery = read_datafile ("plus.json" )
@@ -668,7 +668,7 @@ def test_scopes_from_client_options(self):
668668 discovery = read_datafile ("plus.json" )
669669
670670 with mock .patch ("googleapiclient._auth.default_credentials" ) as default :
671- plus = build_from_document (
671+ build_from_document (
672672 discovery ,
673673 client_options = {"scopes" : ["1" , "2" ]},
674674 )
@@ -679,7 +679,7 @@ def test_quota_project_from_client_options(self):
679679 discovery = read_datafile ("plus.json" )
680680
681681 with mock .patch ("googleapiclient._auth.default_credentials" ) as default :
682- plus = build_from_document (
682+ build_from_document (
683683 discovery ,
684684 client_options = google .api_core .client_options .ClientOptions (
685685 quota_project_id = "my-project"
@@ -692,7 +692,7 @@ def test_credentials_file_from_client_options(self):
692692 discovery = read_datafile ("plus.json" )
693693
694694 with mock .patch ("googleapiclient._auth.credentials_from_file" ) as default :
695- plus = build_from_document (
695+ build_from_document (
696696 discovery ,
697697 client_options = google .api_core .client_options .ClientOptions (
698698 credentials_file = "credentials.json"
@@ -977,7 +977,7 @@ def test_userip_is_added_to_discovery_uri(self):
977977 http = HttpMockSequence (
978978 [({"status" : "400" }, read_datafile ("zoo.json" , "rb" ))]
979979 )
980- zoo = build (
980+ build (
981981 "zoo" ,
982982 "v1" ,
983983 http = http ,
@@ -995,7 +995,7 @@ def test_userip_missing_is_not_added_to_discovery_uri(self):
995995 http = HttpMockSequence (
996996 [({"status" : "400" }, read_datafile ("zoo.json" , "rb" ))]
997997 )
998- zoo = build (
998+ build (
999999 "zoo" ,
10001000 "v1" ,
10011001 http = http ,
@@ -1013,7 +1013,7 @@ def test_key_is_added_to_discovery_uri(self):
10131013 http = HttpMockSequence (
10141014 [({"status" : "400" }, read_datafile ("zoo.json" , "rb" ))]
10151015 )
1016- zoo = build (
1016+ build (
10171017 "zoo" ,
10181018 "v1" ,
10191019 http = http ,
@@ -1232,7 +1232,7 @@ def import_mock(name, *args, **kwargs):
12321232
12331233 self .mocked_api .memcache .get .return_value = None
12341234
1235- plus = build ("plus" , "v1" , http = self .http , static_discovery = False )
1235+ build ("plus" , "v1" , http = self .http , static_discovery = False )
12361236
12371237 # memcache.get is called once
12381238 url = "https://www.googleapis.com/discovery/v1/apis/plus/v1/rest"
@@ -1253,7 +1253,7 @@ def import_mock(name, *args, **kwargs):
12531253 # (Otherwise it should through an error)
12541254 self .http = HttpMock (None , {"status" : "200" })
12551255
1256- plus = build ("plus" , "v1" , http = self .http , static_discovery = False )
1256+ build ("plus" , "v1" , http = self .http , static_discovery = False )
12571257
12581258 # memcache.get is called twice
12591259 self .mocked_api .memcache .get .assert_has_calls (
@@ -1312,7 +1312,7 @@ def test_file_based_cache(self):
13121312 ):
13131313 self .http = HttpMock (datafile ("plus.json" ), {"status" : "200" })
13141314
1315- plus = build ("plus" , "v1" , http = self .http , static_discovery = False )
1315+ build ("plus" , "v1" , http = self .http , static_discovery = False )
13161316
13171317 # cache.get is called once
13181318 url = "https://www.googleapis.com/discovery/v1/apis/plus/v1/rest"
@@ -1329,7 +1329,7 @@ def test_file_based_cache(self):
13291329 # (Otherwise it should through an error)
13301330 self .http = HttpMock (None , {"status" : "200" })
13311331
1332- plus = build ("plus" , "v1" , http = self .http , static_discovery = False )
1332+ build ("plus" , "v1" , http = self .http , static_discovery = False )
13331333
13341334 # cache.get is called twice
13351335 cache .get .assert_has_calls ([mock .call (url ), mock .call (url )])
@@ -1951,7 +1951,7 @@ def test_media_io_base_stream_chunksize_resume(self):
19511951 )
19521952
19531953 try :
1954- body = request .execute (http = http )
1954+ request .execute (http = http )
19551955 except HttpError as e :
19561956 self .assertEqual (b"01234" , e .content )
19571957
0 commit comments