Skip to content

Commit

Permalink
unit test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
MehrazRumman committed Jan 6, 2025
1 parent 4c64cdd commit 8a9fc33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions requirements/extras/gcpubsub.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
google-cloud-pubsub>=2.18.4
google-cloud-monitoring>=2.16.0
grpcio==1.67.0
protobuf==4.25.5
grpcio==1.68.1
protobuf==5.29.2
5 changes: 3 additions & 2 deletions t/unit/transport/test_gcpubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,13 @@ def test_create_subscription(self, channel):
channel.subscriber.create_subscription.assert_called_once()

def test_create_subscription_protobuf_compat(self):
from datetime import timedelta
request = {
'name': 'projects/my_project/subscriptions/kombu-1111-2222',
'topic': 'projects/jether-fox/topics/reply.celery.pidbox',
'ack_deadline_seconds': 240,
'expiration_policy': {'ttl': '86400s'},
'message_retention_duration': '86400s',
'expiration_policy': {'ttl': timedelta(seconds=86400)},
'message_retention_duration': timedelta(seconds=86400),
'filter': 'attributes.routing_key="1111-2222"',
}
Subscription(request)
Expand Down

0 comments on commit 8a9fc33

Please sign in to comment.