@@ -1237,8 +1237,7 @@ def _do_multipart_success(self, mock_get_boundary, size=None,
12371237 mock_get_boundary .assert_called_once_with ()
12381238
12391239 upload_url = (
1240- 'https://www.googleapis.com/upload/storage/v1' +
1241- bucket .path + '/o' )
1240+ 'https://www.googleapis.com/upload/storage/v1' + bucket .path + '/o' )
12421241
12431242 qs_params = [('uploadType' , 'multipart' )]
12441243
@@ -1254,13 +1253,13 @@ def _do_multipart_success(self, mock_get_boundary, size=None,
12541253 upload_url += '?' + urlencode (qs_params )
12551254
12561255 payload = (
1257- b'--==0==\r \n ' +
1258- b'content-type: application/json; charset=UTF-8\r \n \r \n ' +
1259- b'{"name": "blob-name"}\r \n ' +
1260- b'--==0==\r \n ' +
1261- b'content-type: application/xml\r \n \r \n ' +
1262- data_read +
1263- b'\r \n --==0==--' )
1256+ b'--==0==\r \n '
1257+ + b'content-type: application/json; charset=UTF-8\r \n \r \n '
1258+ + b'{"name": "blob-name"}\r \n '
1259+ + b'--==0==\r \n '
1260+ + b'content-type: application/xml\r \n \r \n '
1261+ + data_read
1262+ + b'\r \n --==0==--' )
12641263 headers = {'content-type' : b'multipart/related; boundary="==0=="' }
12651264 transport .request .assert_called_once_with (
12661265 'POST' , upload_url , data = payload , headers = headers )
@@ -1357,8 +1356,7 @@ def _initiate_resumable_helper(
13571356 self .assertIsInstance (upload , ResumableUpload )
13581357
13591358 upload_url = (
1360- 'https://www.googleapis.com/upload/storage/v1' +
1361- bucket .path + '/o' )
1359+ 'https://www.googleapis.com/upload/storage/v1' + bucket .path + '/o' )
13621360 qs_params = [('uploadType' , 'resumable' )]
13631361
13641362 if user_project is not None :
@@ -1481,9 +1479,9 @@ def _do_resumable_upload_call0(
14811479 blob , content_type , size = None , predefined_acl = None ):
14821480 # First mock transport.request() does initiates upload.
14831481 upload_url = (
1484- 'https://www.googleapis.com/upload/storage/v1' +
1485- blob .bucket .path +
1486- '/o?uploadType=resumable' )
1482+ 'https://www.googleapis.com/upload/storage/v1'
1483+ + blob .bucket .path
1484+ + '/o?uploadType=resumable' )
14871485 if predefined_acl is not None :
14881486 upload_url += '&predefinedAcl={}' .format (predefined_acl )
14891487 expected_headers = {
@@ -1819,9 +1817,9 @@ def _create_resumable_upload_session_helper(self, origin=None,
18191817
18201818 # Check the mocks.
18211819 upload_url = (
1822- 'https://www.googleapis.com/upload/storage/v1' +
1823- bucket .path +
1824- '/o?uploadType=resumable' )
1820+ 'https://www.googleapis.com/upload/storage/v1'
1821+ + bucket .path
1822+ + '/o?uploadType=resumable' )
18251823 payload = b'{"name": "blob-name"}'
18261824 expected_headers = {
18271825 'content-type' : 'application/json; charset=UTF-8' ,
0 commit comments