@@ -3572,6 +3572,7 @@ def _create_resumable_upload_session_helper(
3572
3572
origin = None ,
3573
3573
side_effect = None ,
3574
3574
timeout = None ,
3575
+ predefined_acl = None ,
3575
3576
if_generation_match = None ,
3576
3577
if_generation_not_match = None ,
3577
3578
if_metageneration_match = None ,
@@ -3585,6 +3586,8 @@ def _create_resumable_upload_session_helper(
3585
3586
3586
3587
# Create mocks to be checked for doing transport.
3587
3588
resumable_url = "http://test.invalid?upload_id=clean-up-everybody"
3589
+ if predefined_acl is not None :
3590
+ resumable_url += "?" + urlencode ([("predefinedAcl" , predefined_acl )])
3588
3591
response_headers = {"location" : resumable_url }
3589
3592
transport = self ._mock_transport (http .client .OK , response_headers )
3590
3593
if side_effect is not None :
@@ -3611,6 +3614,7 @@ def _create_resumable_upload_session_helper(
3611
3614
size = size ,
3612
3615
origin = origin ,
3613
3616
client = client ,
3617
+ predefined_acl = predefined_acl ,
3614
3618
if_generation_match = if_generation_match ,
3615
3619
if_generation_not_match = if_generation_not_match ,
3616
3620
if_metageneration_match = if_metageneration_match ,
@@ -3672,6 +3676,9 @@ def test_create_resumable_upload_session_with_custom_timeout(self):
3672
3676
def test_create_resumable_upload_session_with_origin (self ):
3673
3677
self ._create_resumable_upload_session_helper (origin = "http://google.com" )
3674
3678
3679
+ def test_create_resumable_upload_session_with_predefined_acl (self ):
3680
+ self ._create_resumable_upload_session_helper (predefined_acl = "private" )
3681
+
3675
3682
def test_create_resumable_upload_session_with_generation_match (self ):
3676
3683
self ._create_resumable_upload_session_helper (
3677
3684
if_generation_match = 123456 , if_metageneration_match = 2
0 commit comments