10000 [Librarian] Regenerated @ a72b955e51d75514f3c944c81b9db17278cfad69 · arpitjain799/twilio-python@6a0ab7f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6a0ab7f

Browse files
committed
[Librarian] Regenerated @ a72b955e51d75514f3c944c81b9db17278cfad69
1 parent fdaae97 commit 6a0ab7f

22 files changed

+1841
-151
lines changed

CHANGES.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,31 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2023-01-25] Version 7.16.2
7+
---------------------------
8+
**Library - Chore**
9+
- [PR #638](https://github.com/twilio/twilio-python/pull/638): relax test dependencies and remove unused dependencies. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
10+
- [PR #609](https://github.com/twilio/twilio-python/pull/609): Security upgrade pygments from 2.5.2 to 2.7.4. Thanks to [@twilio-product-security](https://github.com/twilio-product-security)!
11+
12+
**Library - Docs**
13+
- [PR #637](https://github.com/twilio/twilio-python/pull/637): remove docs output from repo. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
14+
15+
**Library - Test**
16+
- [PR #636](https://github.com/twilio/twilio-python/pull/636): update tox config and replace deprecated test functions. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
17+
18+
**Api**
19+
- Add `public_application_connect_enabled` param to Application resource
20+
21+
**Messaging**
22+
- Add new tollfree verification API property (ExternalReferenceId)]
23+
24+
**Verify**
25+
- Add `device_ip` parameter and channel `auto` for sna/sms orchestration
26+
27+
**Twiml**
28+
- Add support for `<Application>` noun and `<ApplicationSid>` noun, nested `<Parameter>` to `<Hangup>` and `<Leave>` verb
29+
30+
631
[2023-01-11] Version 7.16.1
732
---------------------------
833
**Conversations**
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class InsightsQuestionnairesCategoryTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.flex_api.v1.insights_questionnaires_category.create(name="name", token="token")
22+
23+
values = {'Name': "name", }
24+
25+
headers = {'Token': "token", }
26+
self.holodeck.assert_has_request(Request(
27+
'post',
28+
'https://flex-api.twilio.com/v1/Insights/QM/Categories',
29+
headers=headers,
30+
))
31+
self.holodeck.assert_has_request(Request(
32+
'post',
33+
'https://flex-api.twilio.com/v1/Insights/QM/Categories',
34+
data=values,
35+
))
36+
37+
def test_create_response(self):
38+
self.holodeck.mock(Response(
39+
201,
40+
'''
41+
{
42+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
43+
"category_id": "4b4e78e4-4f05-49e2-bf52-0973c5cde419",
44+
"name": "abc",
45+
"url": "https://flex-api.twilio.com/v1/Insights/QM/Categories/4b4e78e4-4f05-49e2-bf52-0973c5cde419"
46+
}
47+
'''
48+
))
49+
50+
actual = self.client.flex_api.v1.insights_questionnaires_category.create(name="name")
51+
52+
self.assertIsNotNone(actual)
53+
54+
def test_update_request(self):
55+
self.holodeck.mock(Response(500, ''))
56+
57+
with self.assertRaises(TwilioException):
58+
self.client.flex_api.v1.insights_questionnaires_category("category_id").update(name="name", token="token")
59+
60+
values = {'Name': "name", }
61+
62+
headers = {'Token': "token", }
63+
self.holodeck.assert_has_request(Request(
64+
'post',
65+
'https://flex-api.twilio.com/v1/Insights/QM/Categories/category_id',
66+
headers=headers,
67+
))
68+
self.holodeck.assert_has_request(Request(
69+
'post',
70+
'https://flex-api.twilio.com/v1/Insights/QM/Categories/category_id',
71+
data=values,
72+
))
73+
74+
def test_update_response(self):
75+
self.holodeck.mock(Response(
76+
200,
77+
'''
78+
{
79+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80+
"category_id": "4b4e78e4-4f05-49e2-bf52-0973c5cde419",
81+
"name": "abcd",
82+
"url": "https://flex-api.twilio.com/v1/Insights/QM/Categories/4b4e78e4-4f05-49e2-bf52-0973c5cde419"
83+
}
84+
'''
85+
))
86+
87+
actual = self.client.flex_api.v1.insights_questionnaires_category("category_id").update(name="name")
88+
89+
self.assertIsNotNone(actual)
90+
91+
def test_delete_request(self):
92+
self.holodeck.mock(Response(500, ''))
93+
94+
with self.assertRaises(TwilioException):
95+
self.client.flex_api.v1.insights_questionnaires_category("category_id").delete(token="token")
96+
97+
headers = {'Token': "token", }
98+
self.holodeck.assert_has_request(Request(
99+
'delete',
100+
'https://flex-api.twilio.com/v1/Insights/QM/Categories/category_id',
101+
headers=headers,
102+
))
103+
104+
def test_delete_response(self):
105+
self.holodeck.mock(Response(
106+
204,
107+
None,
108+
))
109+
110+
actual = self.client.flex_api.v1.insights_questionnaires_category("category_id").delete()
111+
112+
self.assertTrue(actual)
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class InsightsQuestionnairesQuestionTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.flex_api.v1.insights_questionnaires_question.create(category_id="category_id", question="question", description="description", answer_set_id="answer_set_id", allow_na=True, token="token")
22+
23+
values = {
24+
'CategoryId': "category_id",
25+
'Question': "question",
26+
'Description': "description",
27+
'AnswerSetId': "answer_set_id",
28+
'AllowNa': True,
29+
}
30+
31+
headers = {'Token': "token", }
32+
self.holodeck.assert_has_request(Request(
33+
'post',
34+
'https://flex-api.twilio.com/v1/Insights/QM/Questions',
35+
headers=headers,
36+
))
37+
self.holodeck.assert_has_request(Request(
38+
'post',
39+
'https://flex-api.twilio.com/v1/Insights/QM/Questions',
40+
data=values,
41+
))
42+
43+
def test_create_response(self):
44+
self.holodeck.mock(Response(
45+
201,
46+
'''
47+
{
48+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
49+
"question": "What is the total time",
50+
"question_id": "945ac7ff-8afc-4606-be76-e94b1a80cd72",
51+
"description": "time spent",
52+
"category": {
53+
"category_name": "test cat",
54+
"category_id": "4b4e78e4-4f05-49e2-bf52-0973c5cde418"
55+
},
56+
"answer_set_id": "a6a8a54f-5305-4aec-b92c-a6e429932f58",
57+
"allow_na": false,
58+
"url": "https://flex-api.twilio.com/v1/Insights/QM/Questions/945ac7ff-8afc-4606-be76-e94b1a80cd72"
59+
}
60+
'''
61+
))
62+
63+
actual = self.client.flex_api.v1.insights_questionnaires_question.create(category_id="category_id", question="question", description="description", answer_set_id="answer_set_id", allow_na=True)
64+
65+
self.assertIsNotNone(actual)
66+
67+
def test_update_request(self):
68+
self.holodeck.mock(Response(500, ''))
69+
70+
with self.assertRaises(TwilioException):
71+
self.client.flex_api.v1.insights_questionnaires_question("question_id").update(question="question", description="description", answer_set_id="answer_set_id", allow_na=True, token="token")
72+
73+
values = {
74+
'Question': "question",
75+
'Description': "description",
76+
'AnswerSetId': "answer_set_id",
77+
'AllowNa': True,
78+
}
79+
80+
headers = {'Token': "token", }
81+
self.holodeck.assert_has_request(Request(
82+
'post',
83+
'https://flex-api.twilio.com/v1/Insights/QM/Questions/question_id',
84+
headers=headers,
85+
))
86+
self.holodeck.assert_has_request(Request(
87+
'post',
88+
'https://flex-api.twilio.com/v1/Insights/QM/Questions/question_id',
89+
data=values,
90+
))
91+
92+
def test_update_response(self):
93+
self.holodeck.mock(Response(
94+
200,
95+
'''
96+
{
97+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
98+
"question": "What is the total time",
99+
"question_id": "945ac7ff-8afc-4606-be76-e94b1a80cd72",
100+
"description": "time spent",
101+
"category": {
102+
"category_name": "test cat",
103+
"category_id": "4b4e78e4-4f05-49e2-bf52-0973c5cde418"
104+
},
105+
"answer_set_id": "a6a8a54f-5305-4aec-b92c-a6e429932f58",
106+
"allow_na": false,
107+
"url": "https://flex-api.twilio.com/v1/Insights/QM/Questions/945ac7ff-8afc-4606-be76-e94b1a80cd72"
108+
}
109+
'''
110+
))
111+
112+
actual = self.client.flex_api.v1.insights_questionnaires_question("question_id").update(question="question", description="description", answer_set_id="answer_set_id", allow_na=True)
113+
114+
self.assertIsNotNone(actual)
115+
116+
def test_delete_request(self):
117+
self.holodeck.mock(Response(500, ''))
118+
119+
with self.assertRaises(TwilioException):
120+
self.client.flex_api.v1.insights_questionnaires_question("question_id").delete(token="token")
121+
122+
headers = {'Token': "token", }
123+
self.holodeck.assert_has_request(Request(
124+
'delete',
125+
'https://flex-api.twilio.com/v1/Insights/QM/Questions/question_id',
126+
headers=headers,
127+
))
128+
129+
def test_delete_response(self):
130+
self.holodeck.mock(Response(
131+
204,
132+
None,
133+
))
134+
135+
actual = self.client.flex_api.v1.insights_questionnaires_question("question_id").delete()
136+
137+
self.assertTrue(actual)

tests/integration/flex_api/v1/test_good_data.py renamed to tests/integration/flex_api/v1/test_insights_session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
from twilio.http.response import Response
1313

1414

15-
class GoodDataTestCase(IntegrationTestCase):
15+
class InsightsSessionTestCase(IntegrationTestCase):
1616

1717
def test_create_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.flex_api.v1.good_data().create(token="token")
21+
self.client.flex_api.v1.insights_session().create(token="token")
2222

2323
headers = {'Token': "token", }
2424
self.holodeck.assert_has_request(Request(
@@ -41,6 +41,6 @@ def test_create_response(self):
4141
'''
4242
))
4343

44-
actual = self.client.flex_api.v1.good_data().create()
44+
actual = self.client.flex_api.v1.insights_session().create()
4545

4646
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0