Skip to content

Commit 1ace4b0

Browse files
committed
try fixing up tests
1 parent 2847624 commit 1ace4b0

11 files changed

+6
-405
lines changed

sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_phone_numbers_client.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
PurchasedPhoneNumber,
4040
)
4141

42-
PhoneNumberSearchType = Union[
43-
str,
44-
List[str],
45-
]
46-
4742
class PhoneNumbersClient(object):
4843
"""A client to interact with the AzureCommunicationService Phone Numbers gateway.
4944
@@ -434,7 +429,7 @@ def list_available_area_codes(
434429
@distributed_trace
435430
def search_operator_information(
436431
self,
437-
phone_numbers, # type: PhoneNumberSearchType
432+
phone_numbers, # type: Union[ str, list[str] ]
438433
options:Optional[OperatorInformationOptions]=None, #type: OperatorInformationOptions
439434
**kwargs # type: Any
440435
) -> OperatorInformationResult:
@@ -448,7 +443,7 @@ def search_operator_information(
448443
:rtype: ~azure.communication.phonenumbers.models.OperatorInformationResult
449444
"""
450445
if not isinstance(phone_numbers, list):
451-
phone_numbers = cast(PhoneNumberSearchType, [ phone_numbers ])
446+
phone_numbers = [ phone_numbers ]
452447
if options is None:
453448
options = OperatorInformationOptions(include_additional_operator_details=False)
454449
request = OperatorInformationRequest(phone_numbers = phone_numbers, options=options)

sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/aio/_phone_numbers_client_async.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
PurchasedPhoneNumber,
4040
)
4141

42-
PhoneNumberSearchType = Union[
43-
str,
44-
List[str],
45-
]
46-
4742
class PhoneNumbersClient(object):
4843
"""A client to interact with the AzureCommunicationService Phone Numbers gateway.
4944
@@ -431,7 +426,7 @@ def list_available_area_codes(
431426
@distributed_trace
432427
def search_operator_information(
433428
self,
434-
phone_numbers, # type: PhoneNumberSearchType
429+
phone_numbers, # type: Union [ str, List[str] ]
435430
options:Optional[OperatorInformationOptions]=None, #type: OperatorInformationOptions
436431
**kwargs # type: Any
437432
) -> OperatorInformationResult:
@@ -445,7 +440,7 @@ def search_operator_information(
445440
:rtype: ~azure.communication.phonenumbers.models.OperatorInformationResult
446441
"""
447442
if not isinstance(phone_numbers, list):
448-
phone_numbers = cast(PhoneNumberSearchType, [ phone_numbers ])
443+
phone_numbers = [ phone_numbers ]
449444
if options is None:
450445
options = OperatorInformationOptions(include_additional_operator_details=False)
451446
request = OperatorInformationRequest(phone_numbers = phone_numbers, options = options)

sdk/communication/azure-communication-phonenumbers/test/recordings/test_phone_number_administration_client.pyTestPhoneNumbersClienttest_search_operator_information.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

sdk/communication/azure-communication-phonenumbers/test/recordings/test_phone_number_administration_client.pyTestPhoneNumbersClienttest_search_operator_information_with_list.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

sdk/communication/azure-communication-phonenumbers/test/recordings/test_phone_number_administration_client.pyTestPhoneNumbersClienttest_search_operator_information_with_single_string.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

sdk/communication/azure-communication-phonenumbers/test/recordings/test_phone_number_administration_client.pyTestPhoneNumbersClienttest_search_operator_information_with_too_many_phone_numbers.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

sdk/communication/azure-communication-phonenumbers/test/recordings/test_phone_number_administration_client_async.pyTestPhoneNumbersClientAsynctest_search_operator_information.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

sdk/communication/azure-communication-phonenumbers/test/recordings/test_phone_number_administration_client_async.pyTestPhoneNumbersClientAsynctest_search_operator_information_with_list.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)