File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,14 @@ def _get_channel(self, channel=None):
5555
5656 def get_publisher_client (self , ** kwargs ):
5757 from google .cloud import pubsub
58- kwargs ['channel' ] = self ._get_channel (kwargs .get ('channel' ))
58+ from google .auth import credentials
59+ kwargs ['client_options' ] = dict (api_endpoint = self .get_pubsub_emulator_host ())
60+ kwargs ['credentials' ] = credentials .AnonymousCredentials ()
5961 return pubsub .PublisherClient (** kwargs )
6062
6163 def get_subscriber_client (self , ** kwargs ):
6264 from google .cloud import pubsub
63- kwargs ['channel' ] = self ._get_channel (kwargs .get ('channel' ))
65+ from google .auth import credentials
66+ kwargs ['client_options' ] = dict (api_endpoint = self .get_pubsub_emulator_host ())
67+ kwargs ['credentials' ] = credentials .AnonymousCredentials ()
6468 return pubsub .SubscriberClient (** kwargs )
You can’t perform that action at this time.
0 commit comments