Skip to content

Commit c301211

Browse files
committed
tests
1 parent c512ed1 commit c301211

File tree

4 files changed

+69
-1
lines changed

4 files changed

+69
-1
lines changed

test/unit/api/test_messages_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ def test_list_messages(self) -> None:
108108
assert_that(response.data.messages[0].recipient_count, instance_of(int))
109109
assert_that(response.data.messages[0].campaign_class, instance_of(str))
110110
assert_that(response.data.messages[0].campaign_id, instance_of(str))
111+
assert_that(response.data.messages[0].bw_latency, instance_of(int))
112+
assert_that(response.data.messages[0].calling_number_country_a3, instance_of(str))
113+
assert_that(response.data.messages[0].called_number_country_a3, instance_of(str))
114+
assert_that(response.data.messages[0].product, instance_of(str))
115+
assert_that(response.data.messages[0].location, instance_of(str))
111116

112117

113118
if __name__ == '__main__':

test/unit/models/test_list_message_item.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def make_instance(self, include_optional) -> ListMessageItem:
5050
attachment_count = 1,
5151
recipient_count = 1,
5252
campaign_class = 'T',
53-
campaign_id = 'CJEUMDK'
53+
campaign_id = 'CJEUMDK',
54+
bw_latency = 20,
55+
calling_number_country_a3 = 'USA',
56+
called_number_country_a3 = 'USA',
57+
product = 'P2P',
58+
location = '123ID'
5459
)
5560
else:
5661
return ListMessageItem(
@@ -78,6 +83,11 @@ def testListMessageItem(self):
7883
assert instance.recipient_count == 1
7984
assert instance.campaign_class == 'T'
8085
assert instance.campaign_id == 'CJEUMDK'
86+
assert instance.bw_latency == 20
87+
assert instance.calling_number_country_a3 == 'USA'
88+
assert instance.called_number_country_a3 == 'USA'
89+
assert instance.product == 'P2P'
90+
assert instance.location == '123ID'
8191

8292
if __name__ == '__main__':
8393
unittest.main()

test/unit/models/test_message_type_enum.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ def testMessageTypeEnum(self):
3030
"""Test MessageTypeEnum"""
3131
sms = MessageTypeEnum('sms')
3232
mms = MessageTypeEnum('mms')
33+
rcs = MessageTypeEnum('rcs')
3334
assert sms == 'sms'
3435
assert mms == 'mms'
36+
assert rcs == 'rcs'
3537

3638
if __name__ == '__main__':
3739
unittest.main()
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.product_type_enum import ProductTypeEnum
19+
20+
class TestProductTypeEnum(unittest.TestCase):
21+
"""ProductTypeEnum unit test stubs"""
22+
23+
def setUp(self):
24+
pass
25+
26+
def tearDown(self):
27+
pass
28+
29+
def testProductTypeEnum(self):
30+
"""Test ProductTypeEnum"""
31+
local_a2p = ProductTypeEnum('LOCAL_A2P')
32+
p2p = ProductTypeEnum('P2P')
33+
short_code_reach = ProductTypeEnum('SHORT_CODE_REACH')
34+
toll_free = ProductTypeEnum('TOLL_FREE')
35+
hosted_short_code = ProductTypeEnum('HOSTED_SHORT_CODE')
36+
alpha_numeric = ProductTypeEnum('ALPHA_NUMERIC')
37+
rbm_media = ProductTypeEnum('RBM_MEDIA')
38+
rbm_rich = ProductTypeEnum('RBM_RICH')
39+
rbm_conversational = ProductTypeEnum('RBM_CONVERSATIONAL')
40+
assert local_a2p == 'LOCAL_A2P'
41+
assert p2p == 'P2P'
42+
assert short_code_reach == 'SHORT_CODE_REACH'
43+
assert toll_free == 'TOLL_FREE'
44+
assert hosted_short_code == 'HOSTED_SHORT_CODE'
45+
assert alpha_numeric == 'ALPHA_NUMERIC'
46+
assert rbm_media == 'RBM_MEDIA'
47+
assert rbm_rich == 'RBM_RICH'
48+
assert rbm_conversational == 'RBM_CONVERSATIONAL'
49+
50+
if __name__ == '__main__':
51+
unittest.main()

0 commit comments

Comments
 (0)