fix tests
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index 643b665..2484efd 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -595,7 +595,7 @@
 
     def test_building_with_context_manager(self):
         discovery = read_datafile("plus.json")
-        with mock.patch("httplib2.Http") as http:
+        with mock.patch("httplib2.Http"):
             with build_from_document(
                 discovery,
                 base="https://www.googleapis.com/",
@@ -603,7 +603,7 @@
             ) as plus:
                 self.assertIsNotNone(plus)
                 self.assertTrue(hasattr(plus, "activities"))
-            http.close.assert_called_once()
+            plus._http.http.close.assert_called_once()
 
     def test_resource_close(self):
         discovery = read_datafile("plus.json")