def setUp(self): self.gce_api = gce_api.GceApi('gce_api_test', 'CLIENT_ID', 'CLIENT_SECRET', 'project-name', 'zone-name')
def _GetApi(self): if not self.api: self.api = gce_api.GceApi('hadoop_on_compute', self.CLIENT_ID, self.CLIENT_SECRET, self.flags.project, self.zone) return self.api
def setUp(self): self.authorized_http = mock.MagicMock() self.gce_api = gce_api.GceApi('project-name', 'zone-name', self.authorized_http) self.mock_api_build = mock.patch('apiclient.discovery.build').start()