Skip to content

Commit 59b653e

Browse files
authored
Fix CommunicationTokenCredential constructor in test_chat_client_e2e.py (Azure#16275)
1 parent 9a116b3 commit 59b653e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
from azure.communication.administration import CommunicationIdentityClient
1313
from azure.communication.chat.aio import (
1414
ChatClient,
15-
CommunicationTokenCredential
15+
CommunicationTokenCredential,
16+
CommunicationTokenRefreshOptions
1617
)
1718
from azure.communication.chat import (
1819
ChatThreadMember,
@@ -50,7 +51,8 @@ def setUp(self):
5051
self.new_user = self.identity_client.create_user()
5152

5253
# create ChatClient
53-
self.chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(self.token))
54+
refresh_option = CommunicationTokenRefreshOptions(self.token)
55+
self.chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_option))
5456

5557
def tearDown(self):
5658
super(ChatThreadClientTestAsync, self).tearDown()

0 commit comments

Comments
 (0)