コード例 #1
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)
コード例 #2
0
ファイル: test_transport.py プロジェクト: vit0r/oauth2client
 def test_value(self):
     cache = object()
     with mock.patch('oauth2client.transport._CACHED_HTTP', new=cache):
         result = transport.get_cached_http()
     self.assertIs(result, cache)
コード例 #3
0
 def test_global(self):
     cached_http = transport.get_cached_http()
     self.assertIsInstance(cached_http, httplib2.Http)
     self.assertIsInstance(cached_http.cache, transport.MemoryCache)
コード例 #4
0
ファイル: test_transport.py プロジェクト: vit0r/oauth2client
 def test_global(self):
     cached_http = transport.get_cached_http()
     self.assertIsInstance(cached_http, httplib2.Http)
     self.assertIsInstance(cached_http.cache, transport.MemoryCache)