Skip to content

Commit 5007c6d

Browse files
committed
fix test
1 parent 1c4bfb2 commit 5007c6d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/test_discovery.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -595,15 +595,14 @@ def test_building_with_developer_key_skips_adc(self):
595595

596596
def test_building_with_context_manager(self):
597597
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()
607606

608607
def test_resource_close(self):
609608
discovery = read_datafile("plus.json")

0 commit comments

Comments
 (0)