From 0304021454adc27f7c0cf8e9147cbd950ee67655 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Mon, 24 Apr 2017 16:19:04 -0700 Subject: [PATCH] Fixing broken logging system test. Tries to update a frozenset(). --- logging/tests/system.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logging/tests/system.py b/logging/tests/system.py index 3bd8d5fb2139..89047edef5c4 100644 --- a/logging/tests/system.py +++ b/logging/tests/system.py @@ -389,7 +389,9 @@ def test_create_sink_storage_bucket(self): self.assertTrue(sink.exists()) def test_create_sink_pubsub_topic(self): + from google.cloud.iam import OWNER_ROLE from google.cloud.pubsub import client as pubsub_client + SINK_NAME = 'test-create-sink-topic%s' % (_RESOURCE_ID,) TOPIC_NAME = 'logging-test-sink%s' % (_RESOURCE_ID,) @@ -400,7 +402,9 @@ def test_create_sink_pubsub_topic(self): topic.create() self.to_delete.append(topic) policy = topic.get_iam_policy() - policy.owners.add(policy.group('cloud-logs@google.com')) + new_owners = set([policy.group('cloud-logs@google.com')]) + new_owners.update(policy.owners) + policy[OWNER_ROLE] = new_owners topic.set_iam_policy(policy) TOPIC_URI = 'pubsub.googleapis.com/%s' % (topic.full_name,)