Skip to content

Commit c9f29c9

Browse files
authored
Fixing broken logging system test. (#3325)
Tries to update a frozenset().
1 parent b657337 commit c9f29c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

logging/tests/system.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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,)

0 commit comments

Comments
 (0)