Skip to content

Commit

Permalink
Add location property to job classes. (#5071)
Browse files Browse the repository at this point in the history
* BigQuery: LoadJobConfig change to job.configuration resource repr.

* Fix tests for LoadJob

* CopyJobConfig: use job.configuration for API repr

Also, fixes some lint errors.

* Use job.configuration API resource for ExtractJobConfig

* Use job.configuration API resource for QueryJobConfig.

* Remove unused _EnumAPIResourceProperty class.

Since the API resource properties are no longer used for validation,
there was a test coverage gap.

* Remove second colon for docs rendering.

* Fix docstring. Docstrings for private helper methods.

* Add test for wrong config type.

* BigQuery: Add location field to load job.

* Use explicit location for loading data samples.

* Add location and project parameters to query() method

Uses explicit location in query snippets.

* Add location field to copy and extract jobs.

* Raise KeyError on bad LoadJob. Use autospec for job tests.

- LoadJob expected a KeyError in unit tests for a bad job resource.
- Use more standard autospec mock for Connection mock class.

* Add tests for location params in job classes.

* Use autospec for Connection in job tests.

Use more standard autospec mock for Connection mock class.

* Use autospec for Connection in client tests.

Use more standard autospec mock for Connection mock class.

* Fix _build_resource for jobs (add location field)

* Add unit tests to cover explicit project/location in client.

* Use `assert_called_once_with()`  for connection mocks.

* Update tests to use `assert_called_once_with`

* Add location to `get_job` and `cancel_job`

* Add system tests for `get` and `cancel` with wrong location

* Tests to cover `job.exists()`, `get_job()` and `cancel_job()`

* Fix docs format for `get_job` and `cancel_job`.
  • Loading branch information
tswast authored Mar 20, 2018
1 parent a50ffe7 commit d915544
Show file tree
Hide file tree
Showing 6 changed files with 856 additions and 308 deletions.
Loading

0 comments on commit d915544

Please sign in to comment.