Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
7 changes: 4 additions & 3 deletions bigquery/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from google.api_core.exceptions import BadRequest
from google.api_core.exceptions import Conflict
from google.api_core.exceptions import Forbidden
from google.api_core.exceptions import GoogleAPICallError
from google.api_core.exceptions import NotFound
from google.api_core.exceptions import InternalServerError
from google.api_core.exceptions import ServiceUnavailable
Expand Down Expand Up @@ -765,17 +766,17 @@ def test_load_table_from_file_w_explicit_location(self):
self.assertTrue(eu_query.done)

# Cannot query from US.
with self.assertRaises(BadRequest):
with self.assertRaises(GoogleAPICallError):
list(client.query(query_string, location="US", job_config=query_config))

# Cannot copy from US.
with self.assertRaises(BadRequest):
with self.assertRaises(GoogleAPICallError):
client.copy_table(
table_ref, dataset.table("letters2_us"), location="US"
).result()

# Cannot extract from US.
with self.assertRaises(BadRequest):
with self.assertRaises(GoogleAPICallError):
client.extract_table(
table_ref, "gs://{}/letters-us.csv".format(bucket_name), location="US"
).result()
Expand Down