From 8a9fc330cf9bec52acfa44e6e9955581e5189a79 Mon Sep 17 00:00:00 2001 From: MehrazRumman Date: Mon, 6 Jan 2025 18:25:31 +0600 Subject: [PATCH] unit test fixed --- requirements/extras/gcpubsub.txt | 4 ++-- t/unit/transport/test_gcpubsub.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/requirements/extras/gcpubsub.txt b/requirements/extras/gcpubsub.txt index 8221bb0c6..121204781 100644 --- a/requirements/extras/gcpubsub.txt +++ b/requirements/extras/gcpubsub.txt @@ -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 diff --git a/t/unit/transport/test_gcpubsub.py b/t/unit/transport/test_gcpubsub.py index c617a329e..6ebcce543 100644 --- a/t/unit/transport/test_gcpubsub.py +++ b/t/unit/transport/test_gcpubsub.py @@ -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)