Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Client.list_jobs' to use 'full' projection. #1311

Merged
merged 1 commit into from
Dec 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gcloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def list_jobs(self, max_results=None, page_token=None, all_users=None,
retrieved with another call, passing that value as
``page_token``).
"""
params = {}
params = {'projection': 'full'}

if max_results is not None:
params['maxResults'] = max_results
Expand Down
5 changes: 3 additions & 2 deletions gcloud/bigquery/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def test_list_jobs_defaults(self):
req = conn._requested[0]
self.assertEqual(req['method'], 'GET')
self.assertEqual(req['path'], '/%s' % PATH)
self.assertEqual(req['query_params'], {})
self.assertEqual(req['query_params'], {'projection': 'full'})

def test_list_jobs_explicit_empty(self):
PROJECT = 'PROJECT'
Expand All @@ -282,7 +282,8 @@ def test_list_jobs_explicit_empty(self):
self.assertEqual(req['method'], 'GET')
self.assertEqual(req['path'], '/%s' % PATH)
self.assertEqual(req['query_params'],
{'maxResults': 1000,
{'projection': 'full',
'maxResults': 1000,
'pageToken': TOKEN,
'allUsers': True,
'stateFilter': 'done'})
Expand Down