def testHttpFailure(self, mock_run_flow, mock_storage):
mock_storage.return_value = mock_store = mock.MagicMock()
mock_store.get.return_value = None
mock_run_flow.side_effect = httplib2.HttpLib2Error
output = _GetCommandOutput('fetch', self.json_args + ['userinfo.email'])
self.assertIn('Communication error creating credentials', output)
self.assertEqual(1, mock_store.get.call_count)
self.assertEqual(0, self.mock_test.call_count)
评论列表
文章目录