8000 Update library with visibility · robscc/twilio-python@ffcc28e · GitHub
[go: up one dir, main page]

Skip to content

Commit ffcc28e

Browse files
committed
Update library with visibility
1 parent 127a267 commit ffcc28e

File tree

164 files changed

+9172
-402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+9172
-402
lines changed

tests/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1+
import unittest
12

3+
from tests.holodeck import Holodeck
4+
from twilio.rest import Client
5+
6+
7+
class IntegrationTestCase(unittest.TestCase):
8+
def setUp(self):
9+
super(IntegrationTestCase, self).setUp()
10+
self.account_sid = 'AC' + 'a' * 32
11+
self.auth_token = 'AUTHTOKEN'
12+
self.holodeck = Holodeck()
13+
self.client = Client(username=self.account_sid,
14+
password=self.auth_token,
15+
http_client=self.holodeck)
File renamed without changes.

tests/integration/__init__.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
import unittest
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
28

3-
from tests.integration.holodeck import Holodeck
4-
from twilio.rest import Client
5-
6-
7-
class IntegrationTestCase(unittest.TestCase):
8-
def setUp(self):
9-
super(IntegrationTestCase, self).setUp()
10-
self.account_sid = 'AC' + 'a' * 32
11-
self.auth_token = 'AUTHTOKEN'
12-
self.holodeck = Holodeck()
13-
self.client = Client(username=self.account_sid,
14-
password=self.auth_token,
10000 15-
http_client=self.holodeck)

tests/integration/api/v2010/account/address/test_dependent_phone_number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/available_phone_number/test_local.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/available_phone_number/test_mobile.py

Lines changed: 2 additions & 2 deletions
11
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/available_phone_number/test_toll_free.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/call/test_feedback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/call/test_feedback_summary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"""
88

99
from datetime import date
10-
from tests.integration import IntegrationTestCase
11-
from tests.integration.holodeck import Request
10+
from tests import IntegrationTestCase
11+
from tests.holodeck import Request
1212
from twilio import serialize
1313
from twilio.exceptions import TwilioException
1414
from twilio.http.response import Response

tests/integration/api/v2010/account/call/test_notification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/call/test_recording.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/conference/test_participant.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

@@ -39,6 +39,7 @@ def test_fetch_response(self):
3939
"date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
4040
"end_conference_on_exit": false,
4141
"muted": false,
42+
"hold": false,
4243
"start_conference_on_enter": true,
4344
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
4445
}
@@ -57,16 +58,11 @@ def test_update_request(self):
5758
with self.assertRaises(TwilioException):
5859
self.client.api.v2010.accounts(sid="ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
5960
.conferences(sid="CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
60-
.participants(call_sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(muted=True)
61-
62-
values = {
63-
'Muted': True,
64-
}
61+
.participants(call_sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
6562

6663
self.holodeck.assert_has_request(Request(
6764
'post',
6865
'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
69-
data=values,
7066
))
7167

7268
def test_update_response(self):
@@ -81,6 +77,7 @@ def test_update_response(self):
8177
"date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
8278
"end_conference_on_exit": false,
8379
"muted": false,
80+
"hold": false,
8481
"start_conference_on_enter": true,
8582
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
8683
}
@@ -89,7 +86,7 @@ def test_update_response(self):
8986

9087
actual = self.client.api.v2010.accounts(sid="ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
9188
.conferences(sid="CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
92-
.participants(call_sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(muted=True)
89+
.participants(call_sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
9390

9491
self.assertIsNotNone(actual)
9592

@@ -152,6 +149,7 @@ def test_read_full_response(self):
152149
"date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
153150
"end_conference_on_exit": false,
154151
"muted": false,
152+
"hold": false,
155153
"start_conference_on_enter": true,
156154
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
157155
}

tests/integration/api/v2010/account/incoming_phone_number/test_local.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/incoming_phone_number/test_mobile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/incoming_phone_number/test_toll_free.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/message/test_feedback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/message/test_media.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/queue/test_member.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/recording/test_transcription.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/sip/credential_list/test_credential.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

@@ -181,17 +181,11 @@ def test_update_request(self):
181181
self.client.api.v2010.accounts(sid="ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
182182
.sip \
183183
.credential_lists(sid="CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
184-
.credentials(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(username="username", password="password")
185-
186-
values = {
187-
'Username': "username",
188-
'Password': "password",
189-
}
184+
.credentials(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
190185

191186
self.holodeck.assert_has_request(Request(
192187
'post',
193188
'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
194-
data=values,
195189
))
196190

197191
def test_update_response(self):
@@ -213,7 +207,7 @@ def test_update_response(self):
213207
actual = self.client.api.v2010.accounts(sid="ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
214208
.sip \
215209
.credential_lists(sid="CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
216-
.credentials(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(username="username", password="password")
210+
.credentials(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
217211

218212
self.assertIsNotNone(actual)
219213

tests/integration/api/v2010/account/sip/domain/test_credential_list_mapping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/sip/domain/test_ip_access_control_list_mapping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/sip/ip_access_control_list/test_ip_address.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/sip/test_credential_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/sip/test_domain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/sip/test_ip_access_control_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/test_address.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

tests/integration/api/v2010/account/test_application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/ /
77
"""
88

9-
from tests.integration import IntegrationTestCase
10-
from tests.integration.holodeck import Request
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
1111
from twilio.exceptions import TwilioException
1212
from twilio.http.response import Response
1313

0 commit comments

Comments
 (0)
0