Skip to content

Commit 13d2790

Browse files
committed
Update Live test.
1 parent fdb4e20 commit 13d2790

19 files changed

+396
-411
lines changed

sdk/communication/azure-communication-callingserver/azure/communication/callingserver/_call_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def cancel_participant_media_operation(
211211
def transfer_call(
212212
self,
213213
target_participant, # type: CommunicationIdentifier
214-
user_to_user_information, # type: str
214+
user_to_user_information=None, # type: Optional[str]
215215
**kwargs # type: Any
216216
): # type: (...) -> None
217217

sdk/communication/azure-communication-callingserver/azure/communication/callingserver/_callingserver_client.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,13 @@ def play_audio_to_participant(
291291
)
292292

293293
@distributed_trace()
294-
def add_participant(
294+
def add_participant( # pylint: disable=too-many-arguments
295295
self,
296296
call_locator, # type: CallLocator
297297
participant, # type: CommunicationIdentifier
298298
callback_uri, # type: str
299-
alternate_caller_id, # type: Optional[str]
300-
operation_context, # type: Optional[str]
299+
alternate_caller_id=None, # type: Optional[str]
300+
operation_context=None, # type: Optional[str]
301301
**kwargs # type: Any
302302
): # type: (...) -> AddParticipantResult
303303

@@ -392,15 +392,14 @@ def cancel_participant_media_operation(
392392
**kwargs
393393
)
394394

395-
#pylint:disable=too-many-arguments
396395
@distributed_trace()
397-
def start_recording(
396+
def start_recording( # pylint: disable=too-many-arguments
398397
self,
399398
call_locator, # type: CallLocator
400399
recording_state_callback_uri, # type: str
401-
recording_content_type = None, # type: Optional[RecordingContentType]
402-
recording_channel_type = None, # type: Optional[RecordingChannelType]
403-
recording_format_type = None, # type: Optional[RecordingFormatType]
400+
recording_content_type=None, # type: Optional[RecordingContentType]
401+
recording_channel_type=None, # type: Optional[RecordingChannelType]
402+
recording_format_type=None, # type: Optional[RecordingFormatType]
404403
**kwargs # type: Any
405404
): # type: (...) -> StartCallRecordingResult
406405

sdk/communication/azure-communication-callingserver/azure/communication/callingserver/_content_downloader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
9+
# pylint: disable=unsubscriptable-object
10+
# disabled unsubscriptable-object because of pylint bug referenced here:
11+
# https://github.com/PyCQA/pylint/issues/3882
12+
813
from typing import IO, TYPE_CHECKING
914

1015
try:

sdk/communication/azure-communication-callingserver/azure/communication/callingserver/_models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# ------------------------------------
66
# pylint: skip-file
77

8-
# pylint: skip-file
98
from typing import List, Mapping, Optional, Union, Any # pylint: disable=unused-import
109
from enum import Enum, EnumMeta
1110
from six import with_metaclass

sdk/communication/azure-communication-callingserver/azure/communication/callingserver/aio/_callingserver_client_async.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ async def play_audio_to_participant(
294294
)
295295

296296
@distributed_trace_async()
297-
async def add_participant(
297+
async def add_participant( # pylint: disable=too-many-arguments
298298
self,
299299
call_locator: 'CallLocator',
300300
participant: 'CommunicationIdentifier',
@@ -397,9 +397,8 @@ async def cancel_participant_media_operation(
397397
**kwargs
398398
)
399399

400-
# pylint:disable=too-many-arguments
401400
@distributed_trace_async()
402-
async def start_recording(
401+
async def start_recording( # pylint: disable=too-many-arguments
403402
self,
404403
call_locator: CallLocator,
405404
recording_state_callback_uri: str,

sdk/communication/azure-communication-callingserver/azure/communication/callingserver/aio/_content_downloader_async.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# license information.
55
# --------------------------------------------------------------------------
66

7+
# pylint: disable=unsubscriptable-object
8+
# disabled unsubscriptable-object because of pylint bug referenced here:
9+
# https://github.com/PyCQA/pylint/issues/3882
10+
711
from typing import IO, TYPE_CHECKING
812
from urllib.parse import urlparse
913

@@ -31,9 +35,9 @@ def __init__(self, client, config, serializer, deserializer) -> None:
3135

3236
async def download(
3337
self,
34-
content_url, #type: str
35-
http_range=None, #type: Optional[str]
36-
**kwargs #type: Any
38+
content_url: str,
39+
http_range: Optional[str] = None,
40+
**kwargs: Any
3741
) -> IO:
3842
"""The Download operation downloads content.
3943
:param content_url: The URL where the content is located

sdk/communication/azure-communication-callingserver/tests/_shared/testcase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def process_response(self, response):
4949
response['body']['string'] = self._replace_keys(response['body']['string'])
5050

5151
return response
52-
52+
5353
def _replace_keys(self, body):
5454
def _replace_recursively(dictionary):
5555
for key in dictionary:

sdk/communication/azure-communication-callingserver/tests/recordings/test_live_call_connection.test_create_add_remove_hangup_scenario.yaml

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,34 @@ interactions:
1515
User-Agent:
1616
- azsdk-python-communication-identity/1.0.1 Python/3.9.7 (Windows-10-10.0.19043-SP0)
1717
x-ms-date:
18-
- Sun, 19 Sep 2021 21:28:16 GMT
18+
- Sat, 09 Oct 2021 21:59:09 GMT
1919
x-ms-return-client-request-id:
2020
- 'true'
2121
method: POST
2222
uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07
2323
response:
2424
body:
25-
string: '{"identity":{"id":"8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000c-9fd7-5540-f4f5-343a0d002b3c"}}'
25+
string: '{"identity":{"id":"8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000d-06f2-cf20-c80d-454822000f38"}}'
2626
headers:
2727
api-supported-versions:
2828
- 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1,
2929
2021-10-31-preview
30+
content-length:
31+
- '101'
3032
content-type:
3133
- application/json; charset=utf-8
3234
date:
33-
- Sun, 19 Sep 2021 21:28:16 GMT
35+
- Sat, 09 Oct 2021 21:59:10 GMT
3436
ms-cv:
35-
- qvOTZ+mq70+vqksNLQ+D5w.0
37+
- a/YZ+pYwr0GMd+XN5CCARg.0
3638
request-context:
3739
- appId=
3840
strict-transport-security:
3941
- max-age=2592000
40-
transfer-encoding:
41-
- chunked
4242
x-cache:
4343
- CONFIG_NOCACHE
4444
x-processing-time:
45-
- 42ms
45+
- 112ms
4646
status:
4747
code: 201
4848
message: Created
@@ -62,41 +62,41 @@ interactions:
6262
User-Agent:
6363
- azsdk-python-communication-identity/1.0.1 Python/3.9.7 (Windows-10-10.0.19043-SP0)
6464
x-ms-date:
65-
- Sun, 19 Sep 2021 21:28:17 GMT
65+
- Sat, 09 Oct 2021 21:59:10 GMT
6666
x-ms-return-client-request-id:
6767
- 'true'
6868
method: POST
6969
uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07
7070
response:
7171
body:
72-
string: '{"identity":{"id":"8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000c-9fd7-572f-0e04-343a0d0033ce"}}'
72+
string: '{"identity":{"id":"8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000d-06f2-d037-51d2-44482200104e"}}'
7373
headers:
7474
api-supported-versions:
7575
- 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1,
7676
2021-10-31-preview
77+
content-length:
78+
- '101'
7779
content-type:
7880
- application/json; charset=utf-8
7981
date:
80-
- Sun, 19 Sep 2021 21:28:16 GMT
82+
- Sat, 09 Oct 2021 21:59:10 GMT
8183
ms-cv:
82-
- aInwNGjk3Em4x5zCiLDqRg.0
84+
- C2JBEyQrmEegn5is58IgPg.0
8385
request-context:
8486
- appId=
8587
strict-transport-security:
8688
- max-age=2592000
87-
transfer-encoding:
88-
- chunked
8989
x-cache:
9090
- CONFIG_NOCACHE
9191
x-processing-time:
92-
- 44ms
92+
- 78ms
9393
status:
9494
code: 201
9595
message: Created
9696
- request:
9797
body: '{"alternateCallerId": "sanitized", "targets": "sanitized", "source": "sanitized",
9898
"callbackUri": "sanitized", "requestedMediaTypes": ["audio"], "requestedCallEvents":
99-
["participantsUpdated", "dtmfReceived"]}'
99+
["participantsUpdated", "toneReceived"]}'
100100
headers:
101101
Accept:
102102
- application/json
@@ -111,27 +111,27 @@ interactions:
111111
User-Agent:
112112
- azsdk-python-communication-callingserver/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0)
113113
method: POST
114-
uri: https://sanitized.communication.azure.com/calling/callConnections?api-version=2021-09-15-preview
114+
uri: https://sanitized.communication.azure.com/calling/callConnections?api-version=2021-11-15-preview
115115
response:
116116
body:
117-
string: '{"callConnectionId": "411f0b00-8e45-4c58-9dfb-b58847606d7f"}'
117+
string: '{"callConnectionId": "a11f1300-98c8-409b-8c9b-028c866bae51"}'
118118
headers:
119119
content-length:
120120
- '59'
121121
content-type:
122122
- application/json; charset=utf-8
123123
date:
124-
- Sun, 19 Sep 2021 21:28:19 GMT
124+
- Sat, 09 Oct 2021 21:59:22 GMT
125125
x-cache:
126126
- CONFIG_NOCACHE
127127
x-microsoft-skype-chain-id:
128-
- 7ae446cf-6dae-4997-9cec-c3d9996d1cee
128+
- 04306b7b-0e00-4e64-b750-b29e75902d40
129129
status:
130130
code: 201
131131
message: Created
132132
- request:
133-
body: '{"participant": {"communicationUser": {"id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000c-9f68-6fd6-e57b-254822002248"}},
134-
"operationContext": "03e4b3d5-e50b-4957-97e3-15f3df772a2a"}'
133+
body: '{"participant": {"communicationUser": {"id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000d-06a7-7ed4-bf75-25482200020e"}},
134+
"operationContext": "eac85f64-dc6f-4d2b-b15a-a50c6a4b1cc4"}'
135135
headers:
136136
Accept:
137137
- application/json
@@ -146,26 +146,26 @@ interactions:
146146
User-Agent:
147147
- azsdk-python-communication-callingserver/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0)
148148
method: POST
149-
uri: https://sanitized.communication.azure.com/calling/callConnections/411f0b00-8e45-4c58-9dfb-b58847606d7f/participants?api-version=2021-09-15-preview
149+
uri: https://sanitized.communication.azure.com/calling/callConnections/a11f1300-98c8-409b-8c9b-028c866bae51/participants?api-version=2021-11-15-preview
150150
response:
151151
body:
152-
string: '{"participantId": "0dd3ccdf-0754-4d23-b082-5052e5b66ea7"}'
152+
string: '{"participantId": "d432b441-7ff8-43b1-900b-fe5d18f2a3f8"}'
153153
headers:
154154
content-length:
155155
- '56'
156156
content-type:
157157
- application/json; charset=utf-8
158158
date:
159-
- Sun, 19 Sep 2021 21:28:29 GMT
159+
- Sat, 09 Oct 2021 21:59:33 GMT
160160
x-cache:
161161
- CONFIG_NOCACHE
162162
x-microsoft-skype-chain-id:
163-
- e391ce75-1bad-4f66-b337-652e3fc11d31
163+
- c26eb778-bf2e-407d-97ee-7b59f81134b3
164164
status:
165165
code: 202
166166
message: Accepted
167167
- request:
168-
body: null
168+
body: '{"identifier": {"communicationUser": {"id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000d-06a7-7ed4-bf75-25482200020e"}}}'
169169
headers:
170170
Accept:
171171
- application/json
@@ -174,23 +174,25 @@ interactions:
174174
Connection:
175175
- keep-alive
176176
Content-Length:
177-
- '0'
177+
- '128'
178+
Content-Type:
179+
- application/json
178180
User-Agent:
179181
- azsdk-python-communication-callingserver/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0)
180-
method: DELETE
181-
uri: https://sanitized.communication.azure.com/calling/callConnections/411f0b00-8e45-4c58-9dfb-b58847606d7f/participants/0dd3ccdf-0754-4d23-b082-5052e5b66ea7?api-version=2021-09-15-preview
182+
method: POST
183+
uri: https://sanitized.communication.azure.com/calling/callConnections/a11f1300-98c8-409b-8c9b-028c866bae51/participants:remove?api-version=2021-11-15-preview
182184
response:
183185
body:
184186
string: ''
185187
headers:
186188
content-length:
187189
- '0'
188190
date:
189-
- Sun, 19 Sep 2021 21:28:39 GMT
191+
- Sat, 09 Oct 2021 21:59:43 GMT
190192
x-cache:
191193
- CONFIG_NOCACHE
192194
x-microsoft-skype-chain-id:
193-
- e164c268-200c-49c6-ae16-0eff535cc95b
195+
- d51e3f8f-d16b-4750-a677-8087f42a8cbb
194196
status:
195197
code: 202
196198
message: Accepted
@@ -208,19 +210,19 @@ interactions:
208210
User-Agent:
209211
- azsdk-python-communication-callingserver/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0)
210212
method: POST
211-
uri: https://sanitized.communication.azure.com/calling/callConnections/411f0b00-8e45-4c58-9dfb-b58847606d7f/:hangup?api-version=2021-09-15-preview
213+
uri: https://sanitized.communication.azure.com/calling/callConnections/a11f1300-98c8-409b-8c9b-028c866bae51/:hangup?api-version=2021-11-15-preview
212214
response:
213215
body:
214216
string: ''
215217
headers:
216218
content-length:
217219
- '0'
218220
date:
219-
- Sun, 19 Sep 2021 21:28:49 GMT
221+
- Sat, 09 Oct 2021 21:59:53 GMT
220222
x-cache:
221223
- CONFIG_NOCACHE
222224
x-microsoft-skype-chain-id:
223-
- e80676cc-e297-4d19-95e8-60c1005cee43
225+
- 1bdafd8c-f0be-45a1-93ec-a5aa301da718
224226
status:
225227
code: 202
226228
message: Accepted

0 commit comments

Comments
 (0)