def test_value(self):
     cache = object()
     with mock.patch('oauth2client.transport._CACHED_HTTP', new=cache):
         result = transport.get_cached_http()
     self.assertIs(result, cache)
Esempio n. 2
0
 def test_value(self):
     cache = object()
     with mock.patch('oauth2client.transport._CACHED_HTTP', new=cache):
         result = transport.get_cached_http()
     self.assertIs(result, cache)
 def test_global(self):
     cached_http = transport.get_cached_http()
     self.assertIsInstance(cached_http, httplib2.Http)
     self.assertIsInstance(cached_http.cache, transport.MemoryCache)
Esempio n. 4
0
 def test_global(self):
     cached_http = transport.get_cached_http()
     self.assertIsInstance(cached_http, httplib2.Http)
     self.assertIsInstance(cached_http.cache, transport.MemoryCache)