Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test for multipart body comparison #1448

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 4 additions & 2 deletions gcloud/bigquery/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,9 +1397,11 @@ def test_upload_from_file_w_bound_client_multipart(self):
{'Content-Type': 'application/octet-stream',
'Content-Transfer-Encoding': 'binary',
'MIME-Version': '1.0'})
body = BODY.decode('ascii')
body = BODY.decode('ascii').strip()
body_lines = [line.strip() for line in body.splitlines()]
payload_lines = app_msg._payload.splitlines()
payload = app_msg._payload.decode('ascii').strip()
payload_lines = [line.strip() for line in payload.splitlines()]

self.assertEqual(payload_lines, body_lines)

# pylint: disable=R0915
Expand Down