From 0b44abcde49c7eff940b13b73199ebee0c4ba75c Mon Sep 17 00:00:00 2001 From: Sam Cheung Date: Wed, 20 Jan 2021 16:18:10 -0800 Subject: [PATCH] Fix CommunicationTokenCredential constructor in test_chat_client_e2e.py --- .../tests/test_chat_thread_client_e2e_async.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py index a4cf235bfae0..7c0c6c7b80cc 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py @@ -12,7 +12,8 @@ from azure.communication.administration import CommunicationIdentityClient from azure.communication.chat.aio import ( ChatClient, - CommunicationTokenCredential + CommunicationTokenCredential, + CommunicationTokenRefreshOptions ) from azure.communication.chat import ( ChatThreadMember, @@ -50,7 +51,8 @@ def setUp(self): self.new_user = self.identity_client.create_user() # create ChatClient - self.chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(self.token)) + refresh_option = CommunicationTokenRefreshOptions(self.token) + self.chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_option)) def tearDown(self): super(ChatThreadClientTestAsync, self).tearDown()