File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,9 @@ def test_create_sink_storage_bucket(self):
389389 self .assertTrue (sink .exists ())
390390
391391 def test_create_sink_pubsub_topic (self ):
392+ from google .cloud .iam import OWNER_ROLE
392393 from google .cloud .pubsub import client as pubsub_client
394+
393395 SINK_NAME = 'test-create-sink-topic%s' % (_RESOURCE_ID ,)
394396 TOPIC_NAME = 'logging-test-sink%s' % (_RESOURCE_ID ,)
395397
@@ -400,7 +402,9 @@ def test_create_sink_pubsub_topic(self):
400402 topic .create ()
401403 self .to_delete .append (topic )
402404 policy = topic .get_iam_policy ()
403- policy .
owners .
add (
policy .
group (
'[email protected] ' ))
405+ new_owners = set ([
policy .
group (
'[email protected] ' )])
406+ new_owners .update (policy .owners )
407+ policy [OWNER_ROLE ] = new_owners
404408 topic .set_iam_policy (policy )
405409
406410 TOPIC_URI = 'pubsub.googleapis.com/%s' % (topic .full_name ,)
You can’t perform that action at this time.
0 commit comments