| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e8abf11 commit ae4a0ec
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,12 +57,12 @@ class PublicBigqueryClient(bigquery.client.Client): | |||
| 57 | 57 | client = PublicBigqueryClient() | |
| 58 | 58 | """ | |
| 59 | 59 | ||
| 60 | - def __init__(self): | ||
| 60 | + def __init__(self, *args, **kwargs): | ||
| 61 | 61 | data_proxy_project = os.getenv("KAGGLE_DATA_PROXY_PROJECT") | |
| 62 | 62 | anon_credentials = credentials.AnonymousCredentials() | |
| 63 | 63 | anon_credentials.refresh = lambda *args: None | |
| 64 | 64 | super().__init__( | |
| 65 | - project=data_proxy_project, credentials=anon_credentials | ||
| 65 | + project=data_proxy_project, credentials=anon_credentials, *args, **kwargs | ||
| 66 | 66 | ) | |
| 67 | 67 | # TODO: Remove this once https://github.com/googleapis/google-cloud-python/issues/7122 is implemented. | |
| 68 | 68 | self._connection = _DataProxyConnection(self) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,6 +56,13 @@ def test_proxy_no_project(self): | |||
| 56 | 56 | client = bigquery.Client() | |
| 57 | 57 | self._test_proxy(client, should_use_proxy=True) | |
| 58 | 58 | ||
| 59 | + def test_proxy_with_kwargs(self): | ||
| 60 | + env = EnvironmentVarGuard() | ||
| 61 | + env.unset('KAGGLE_BQ_USER_JWT') | ||
| 62 | + with env: | ||
| 63 | + client = bigquery.Client(default_query_job_config=bigquery.QueryJobConfig(maximum_bytes_billed=1e9)) | ||
| 64 | + self._test_proxy(client, should_use_proxy=True) | ||
| 65 | + | ||
| 59 | 66 | def test_project_with_connected_account(self): | |
| 60 | 67 | env = EnvironmentVarGuard() | |
| 61 | 68 | env.set('KAGGLE_BQ_USER_JWT', 'foobar') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments