1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from devtools_testutils import recorded_by_proxy
from _decorators import MessagesPreparers
from azure.communication.messages.models import MessageTemplateItem, MessageTemplate
from _shared.utils import get_http_logging_policy
from _messages_test_case import MessagesRecordedTestCase
from azure.communication.messages._shared.utils import parse_connection_str
class TestMessageTemplateClientToGetTemplates(MessagesRecordedTestCase):
@MessagesPreparers.messages_test_decorator
@recorded_by_proxy
def test_get_templates(self):
channel_id = "75476a19-a68d-4e10-806c-3680f099e069"
raised = False
message_template_client = self.create_message_template_client()
try:
with message_template_client:
message_template_item_list = message_template_client.list_templates(channel_id)
except:
raised = True
raise
assert raised is False
assert message_template_item_list is not None
|