|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + Bandwidth |
| 5 | +
|
| 6 | + Bandwidth's Communication APIs |
| 7 | +
|
| 8 | + The version of the OpenAPI document: 1.0.0 |
| 9 | + |
| 10 | + Generated by OpenAPI Generator (https://openapi-generator.tech) |
| 11 | +
|
| 12 | + Do not edit the class manually. |
| 13 | +""" # noqa: E501 |
| 14 | + |
| 15 | + |
| 16 | +import unittest |
| 17 | + |
| 18 | +from bandwidth.models.create_multi_channel_message_response import CreateMultiChannelMessageResponse |
| 19 | +from bandwidth.models.link import Link |
| 20 | +from bandwidth.models.multi_channel_message_data import MultiChannelMessageData |
| 21 | +from bandwidth.models.error_object import ErrorObject |
| 22 | + |
| 23 | +class TestCreateMultiChannelMessageResponse(unittest.TestCase): |
| 24 | + """CreateMultiChannelMessageResponse unit test stubs""" |
| 25 | + |
| 26 | + def setUp(self): |
| 27 | + pass |
| 28 | + |
| 29 | + def tearDown(self): |
| 30 | + pass |
| 31 | + |
| 32 | + def make_instance(self, include_optional) -> CreateMultiChannelMessageResponse: |
| 33 | + """Test CreateMultiChannelMessageResponse |
| 34 | + include_optional is a boolean, when False only required |
| 35 | + params are included, when True both required and |
| 36 | + optional params are included """ |
| 37 | + if include_optional: |
| 38 | + return CreateMultiChannelMessageResponse( |
| 39 | + links = [ |
| 40 | + Link( |
| 41 | + rel = 'rel', |
| 42 | + href = 'href', ) |
| 43 | + ], |
| 44 | + data = MultiChannelMessageData( |
| 45 | + message_id = '1589228074636lm4k2je7j7jklbn2', |
| 46 | + status = 'DELIVERED', |
| 47 | + time = '2025-01-01T18:20:16Z', |
| 48 | + direction = 'OUTBOUND', |
| 49 | + var_from = 'BandwidthRBM', |
| 50 | + to = '+15552223333', |
| 51 | + application_id = '93de2206-9669-4e07-948d-329f4b722ee2', |
| 52 | + channel = 'RBM', |
| 53 | + tag = 'custom string', ), |
| 54 | + errors = [ |
| 55 | + ErrorObject( |
| 56 | + code = 'code', |
| 57 | + message = 'message', ) |
| 58 | + ] |
| 59 | + ) |
| 60 | + else: |
| 61 | + return CreateMultiChannelMessageResponse( |
| 62 | + ) |
| 63 | + |
| 64 | + def testCreateMultiChannelMessageResponse(self): |
| 65 | + """Test CreateMultiChannelMessageResponse""" |
| 66 | + instance = self.make_instance(True) |
| 67 | + assert instance is not None |
| 68 | + assert isinstance(instance, CreateMultiChannelMessageResponse) |
| 69 | + assert isinstance(instance.links, list) |
| 70 | + assert isinstance(instance.data, MultiChannelMessageData) |
| 71 | + assert isinstance(instance.errors, list) |
| 72 | + assert isinstance(instance.links[0], Link) |
| 73 | + assert isinstance(instance.data, MultiChannelMessageData) |
| 74 | + assert isinstance(instance.errors[0], ErrorObject) |
| 75 | + assert instance.data.message_id == '1589228074636lm4k2je7j7jklbn2' |
| 76 | + assert instance.data.status == 'DELIVERED' |
| 77 | + assert instance.data.direction == 'OUTBOUND' |
| 78 | + assert instance.data.var_from == 'BandwidthRBM' |
| 79 | + assert instance.data.to == '+15552223333' |
| 80 | + assert instance.data.application_id == '93de2206-9669-4e07-948d-329f4b722ee2' |
| 81 | + assert instance.data.channel == 'RBM' |
| 82 | + assert instance.data.tag == 'custom string' |
| 83 | + assert instance.errors[0].code == 'code' |
| 84 | + assert instance.errors[0].message == 'message' |
| 85 | + assert instance.links[0].rel == 'rel' |
| 86 | + assert instance.links[0].href == 'href' |
| 87 | + |
| 88 | + |
| 89 | +if __name__ == '__main__': |
| 90 | + unittest.main() |
0 commit comments