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)