Skip to content

Commit

Permalink
Merge pull request #1311 from tseaver/bigquery-fix_list_jobs_projection
Browse files Browse the repository at this point in the history
Fix 'Client.list_jobs' to use 'full' projection.
  • Loading branch information
tseaver committed Dec 21, 2015
2 parents 4861e7e + ceed0c0 commit 4734112
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 4734112

Please sign in to comment.