Skip to content

Commit

Permalink
Fix BigQuery client unit test assertions (googleapis#9112)
Browse files Browse the repository at this point in the history
Since a timeout argument is now sent with HTTP requests by default,
the call assertions need adjustment.
  • Loading branch information
plamut authored and emar-kar committed Sep 18, 2019
1 parent f612a17 commit 0fca325
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bigquery/tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3110,6 +3110,7 @@ def _initiate_resumable_upload_helper(self, num_retries=None):
upload_url,
data=json.dumps(metadata).encode("utf-8"),
headers=request_headers,
timeout=mock.ANY,
)

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

@mock.patch(u"google.resumable_media._upload.get_boundary", return_value=b"==0==")
Expand Down Expand Up @@ -5896,6 +5897,7 @@ def test__do_resumable_upload(self):
mock.ANY,
data=json.dumps(self.EXPECTED_CONFIGURATION).encode("utf-8"),
headers=mock.ANY,
timeout=mock.ANY,
)

def test__do_multipart_upload(self):
Expand Down

0 comments on commit 0fca325

Please sign in to comment.