We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbb8310 commit 09203faCopy full SHA for 09203fa
pubsub/unit_tests/test_subscription.py
@@ -14,6 +14,8 @@
14
15
import unittest
16
17
+import mock
18
+
19
20
class TestSubscription(unittest.TestCase):
21
PROJECT = 'PROJECT'
@@ -745,6 +747,16 @@ def test___exit___(self):
745
747
[ACK_ID1, ACK_ID2])
746
748
self.assertIs(subscription._ack_client, CLIENT)
749
750
+ def test_empty_ack_no_acknowledge(self):
751
+ subscription = mock.Mock(_FauxSubscription)
752
+ subscription.pull = lambda *args: []
753
754
+ auto_ack = self._make_one(subscription)
755
+ with auto_ack:
756
+ pass
757
758
+ subscription.acknowledge.assert_not_called()
759
760
761
class _FauxIAMPolicy(object):
762
0 commit comments