Skip to content

Commit e090bcd

Browse files
noerogengelke
authored andcommitted
Add test for updating a subscription. (#1336)
Tests for #1335. Using ack_deadline_seconds as the example.
1 parent f241636 commit e090bcd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pubsub/cloud-client/subscriber_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ def _():
154154
subscriber_client.get_subscription(subscription)
155155

156156

157+
def test_update(subscriber_client, subscription, capsys):
158+
ACK_DEADLINE_SECONDS = 100
159+
160+
subscriber.update_subscription(PROJECT, SUBSCRIPTION, ACK_DEADLINE_SECONDS)
161+
162+
out, _ = capsys.readouterr()
163+
assert subscription in out
164+
assert '100' in out
165+
166+
157167
def _publish_messages(publisher_client, topic):
158168
for n in range(5):
159169
data = u'Message {}'.format(n).encode('utf-8')

0 commit comments

Comments
 (0)