8000 [Librarian] Regenerated @ c48a170b0ac22fcd4d3d6d834a922eb3e138735d · anthokip/twilio-python@df979a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit df979a4

Browse files
committed
[Librarian] Regenerated @ c48a170b0ac22fcd4d3d6d834a922eb3e138735d
1 parent ba50928 commit df979a4

File tree

16 files changed

+1777
-41
lines changed

16 files changed

+1777
-41
lines changed

CHANGES.md

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

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

6+
[2018-01-30] Version 6.10.2
7+
----------------------------
8+
**Preview**
9+
- Remove Studio Engagement Deletion
10+
11+
**Studio**
12+
- Initial Release
13+
14+
615
[2018-01-30] Version 6.10.1
716
----------------------------
817
**Api**

tests/integration/preview/studio/flow/test_engagement.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,3 @@ def test_create_response(self):
134134
.engagements.create(to="+15558675310", from_="+15017122661")
135135

136136
self.assertIsNotNone(actual)
137-
138-
def test_delete_request(self):
139-
self.holodeck.mock(Response(500, ''))
140-
141-
with self.assertRaises(TwilioException):
142-
self.client.preview.studio.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
143-
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
144-
145-
self.holodeck.assert_has_request(Request(
146-
'delete',
147-
'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
148-
))
149-
150-
def test_delete_response(self):
151-
self.holodeck.mock(Response(
152-
204,
153-
None,
154-
))
155-
156-
actual = self.client.preview.studio.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
157-
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
158-
159-
self.assertTrue(actual)

tests/integration/studio/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# coding=utf-8
2+
"""
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 StepTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
22+
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
23+
.steps.list()
24+
25+
self.holodeck.assert_has_request(Request(
26+
'get',
27+
'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps',
28+
))
29+
30+
def test_read_empty_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"meta": {
36+
"previous_page_url": null,
37+
"next_page_url": null,
38+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",
39+
"page": 0,
40+
"first_page_url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",
41+
"page_size": 50,
42+
"key": "steps"
43+
},
44+
"steps": []
45+
}
46+
'''
47+
))
48+
49+
actual = self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
50+
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
51+
.steps.list()
52+
53+
self.assertIsNotNone(actual)
54+
55+
def test_fetch_request(self):
56+
self.holodeck.mock(Response(500, ''))
57+
58+
with self.assertRaises(TwilioException):
59+
self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
60+
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
61+
.steps(sid="FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
62+
63+
self.holodeck.assert_has_request(Request(
64+
'get',
65+
'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
66+
))
67+
68+
def test_fetch_response(self):
69+
self.holodeck.mock(Response(
70+
200,
71+
'''
72+
{
73+
"sid": "FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
75+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
76+
"engagement_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
77+
"name": "incomingRequest",
78+
"context": {},
79+
"transitioned_from": "Trigger",
80+
"transitioned_to": "Ended",
81+
"date_created": "2017-11-06T12:00:00Z",
82+
"date_updated": null,
83+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
84+
}
85+
'''
86+
))
87+
88+
actual = self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
89+
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
90+
.steps(sid="FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
91+
92+
self.assertIsNotNone(actual)
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# coding=utf-8
2+
"""
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 EngagementTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
22+
.engagements.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"meta": {
35+
"previous_page_url": null,
36+
"next_page_url": null,
37+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements?PageSize=50&Page=0",
38+
"page": 0,
39+
"first_page_url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements?PageSize=50&Page=0",
40+
"page_size": 50,
41+
"key": "engagements"
42+
},
43+
"engagements": []
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
49+
.engagements.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_fetch_request(self):
54+
self.holodeck.mock(Response(500, ''))
55+
56+
with self.assertRaises(TwilioException):
57+
self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
58+
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
59+
60+
self.holodeck.assert_has_request(Request(
61+
'get',
62+
'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
63+
))
64+
65+
def test_fetch_response(self):
66+
self.holodeck.mock(Response(
67+
200,
68+
'''
69+
{
70+
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
71+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73+
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74+
"contact_channel_address": "+14155555555",
75+
"status": "ended",
76+
"context": {},
77+
"date_created": "2017-11-06T12:00:00Z",
78+
"date_updated": null,
79+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80+
"links": {
81+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
82+
}
83+
}
84+
'''
85+
))
86+
87+
actual = self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
88+
.engagements(sid="FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
89+
90+
self.assertIsNotNone(actual)
91+
92+
def test_create_request(self):
93+
self.holodeck.mock(Response(500, ''))
94+
95+
with self.assertRaises(TwilioException):
96+
self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
97+
.engagements.create(to="+15558675310", from_="+15017122661")
98+
99+
values = {'To': "+15558675310", 'From': "+15017122661", }
100+
101+
self.holodeck.assert_has_request(Request(
102+
'post',
103+
'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements',
104+
data=values,
105+
))
106+
107+
def test_create_response(self):
108+
self.holodeck.mock(Response(
109+
201,
110+
'''
111+
{
112+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
113+
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
114+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
115+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116+
"context": {
117+
"flow": {
118+
"first_name": "Foo"
119+
}
120+
},
121+
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122+
"contact_channel_address": "+18001234567",
123+
"status": "active",
124+
"date_created": "2015-07-30T20:00:00Z",
125+
"date_updated": "2015-07-30T20:00:00Z",
126+
"links": {
127+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
128+
}
129+
}
130+
'''
131+
))
132+
133+
actual = self.client.studio.v1.flows(sid="FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
134+
.engagements.create(to="+15558675310", from_="+15017122661")
135+
136+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0