Skip to content

Commit 0fca325

Browse files
plamutemar-kar
authored andcommitted
Fix BigQuery client unit test assertions (googleapis#9112)
Since a timeout argument is now sent with HTTP requests by default, the call assertions need adjustment.
1 parent f612a17 commit 0fca325

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bigquery/tests/unit/test_client.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3110,6 +3110,7 @@ def _initiate_resumable_upload_helper(self, num_retries=None):
31103110
upload_url,
31113111
data=json.dumps(metadata).encode("utf-8"),
31123112
headers=request_headers,
3113+
timeout=mock.ANY,
31133114
)
31143115

31153116
def test__initiate_resumable_upload(self):
@@ -3162,7 +3163,7 @@ def _do_multipart_upload_success_helper(self, get_boundary, num_retries=None):
31623163
headers = _get_upload_headers(conn.user_agent)
31633164
headers["content-type"] = b'multipart/related; boundary="==0=="'
31643165
fake_transport.request.assert_called_once_with(
3165-
"POST", upload_url, data=payload, headers=headers
3166+
"POST", upload_url, data=payload, headers=headers, timeout=mock.ANY
31663167
)
31673168

31683169
@mock.patch(u"google.resumable_media._upload.get_boundary", return_value=b"==0==")
@@ -5896,6 +5897,7 @@ def test__do_resumable_upload(self):
58965897
mock.ANY,
58975898
data=json.dumps(self.EXPECTED_CONFIGURATION).encode("utf-8"),
58985899
headers=mock.ANY,
5900+
timeout=mock.ANY,
58995901
)
59005902

59015903
def test__do_multipart_upload(self):

0 commit comments

Comments
 (0)