@@ -67,8 +67,13 @@ def test_initialize_readonly(self, mock_build, mock_return_cred):
67
67
scopes = BIGQUERY_SCOPE_READ_ONLY )
68
68
self .assertTrue (
69
69
mock_cred .from_p12_keyfile_buffer .return_value .authorize .called )
70
- mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http ,
71
- discoveryServiceUrl = mock_service_url )
70
+ mock_build .assert_called_once_with (
71
+ 'bigquery' ,
72
+ 'v2' ,
73
+ http = mock_http ,
74
+ discoveryServiceUrl = mock_service_url ,
75
+ cache_discovery = False
76
+ )
72
77
self .assertEquals (mock_bq , bq_client .bigquery )
73
78
self .assertEquals (project_id , bq_client .project_id )
74
79
@@ -101,8 +106,13 @@ def test_initialize_read_write(self, mock_build, mock_return_cred):
101
106
service_account , mock .ANY , scopes = BIGQUERY_SCOPE )
102
107
self .assertTrue (
103
108
mock_cred .from_p12_keyfile_buffer .return_value .authorize .called )
104
- mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http ,
105
- discoveryServiceUrl = mock_service_url )
109
+ mock_build .assert_called_once_with (
110
+ 'bigquery' ,
111
+ 'v2' ,
112
+ http = mock_http ,
113
+ discoveryServiceUrl = mock_service_url ,
114
+ cache_discovery = False
115
+ )
106
116
self .assertEquals (mock_bq , bq_client .bigquery )
107
117
self .assertEquals (project_id , bq_client .project_id )
108
118
@@ -136,8 +146,13 @@ def test_initialize_key_file(self, mock_build, mock_return_cred):
136
146
scopes = BIGQUERY_SCOPE )
137
147
self .assertTrue (
138
148
mock_cred .from_p12_keyfile .return_value .authorize .called )
139
- mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http ,
140
- discoveryServiceUrl = mock_service_url )
149
+ mock_build .assert_called_once_with (
150
+ 'bigquery' ,
151
+ 'v2' ,
152
+ http = mock_http ,
153
+ discoveryServiceUrl = mock_service_url ,
154
+ cache_discovery = False
155
+ )
141
156
self .assertEquals (mock_bq , bq_client .bigquery )
142
157
self .assertEquals (project_id , bq_client .project_id )
143
158
@@ -172,8 +187,13 @@ def test_initialize_json_key_file(self, mock_open, mock_build, mock_return_cred)
172
187
scopes = BIGQUERY_SCOPE )
173
188
self .assertTrue (
174
189
mock_cred .from_json_keyfile_dict .return_value .authorize .called )
175
- mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http ,
176
- discoveryServiceUrl = mock_service_url )
190
+ mock_build .assert_called_once_with (
191
+ 'bigquery' ,
192
+ 'v2' ,
193
+ http = mock_http ,
194
+ discoveryServiceUrl = mock_service_url ,
195
+ cache_discovery = False
196
+ )
177
197
self .assertEquals (mock_bq , bq_client .bigquery )
178
198
self .assertEquals (project_id , bq_client .project_id )
179
199
@@ -208,8 +228,13 @@ def test_initialize_json_key_file_without_project_id(self, mock_open, mock_build
208
228
scopes = BIGQUERY_SCOPE )
209
229
self .assertTrue (
210
230
mock_cred .from_json_keyfile_dict .return_value .authorize .called )
211
- mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http ,
212
- discoveryServiceUrl = mock_service_url )
231
+ mock_build .assert_called_once_with (
232
+ 'bigquery' ,
233
+ 'v2' ,
234
+ http = mock_http ,
235
+ discoveryServiceUrl = mock_service_url ,
236
+ cache_discovery = False
237
+ )
213
238
self .assertEquals (mock_bq , bq_client .bigquery )
214
239
self .assertEquals (json_key ['project_id' ], bq_client .project_id )
215
240
0 commit comments