File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -595,15 +595,14 @@ def test_building_with_developer_key_skips_adc(self):
595
595
596
596
def test_building_with_context_manager (self ):
597
597
discovery = read_datafile ("plus.json" )
598
- with mock .patch ("httplib2.Http" ) as http :
599
- with build_from_document (
600
- discovery ,
601
- base = "https://www.googleapis.com/" ,
602
- credentials = self .MOCK_CREDENTIALS ,
603
- ) as plus :
604
- self .assertIsNotNone (plus )
605
- self .assertTrue (hasattr (plus , "activities" ))
606
- http .close .assert_called_once ()
598
+ with build_from_document (
599
+ discovery ,
600
+ base = "https://www.googleapis.com/" ,
601
+ credentials = self .MOCK_CREDENTIALS ,
602
+ ) as plus :
603
+ self .assertIsNotNone (plus )
604
+ self .assertTrue (hasattr (plus , "activities" ))
605
+ plus ._http .http .close .assert_called_once ()
607
606
608
607
def test_resource_close (self ):
609
608
discovery = read_datafile ("plus.json" )
You can’t perform that action at this time.
0 commit comments