10000 Partway through the conversion to kwargs · Twilio-api/twilio-python@a72abad · GitHub
[go: up one dir, main page]

Skip to content

Commit a72abad

Browse files
committed
Partway through the conversion to kwargs
1 parent cd5fced commit a72abad

File tree

2 files changed

+81
-167
lines changed

2 files changed

+81
-167
lines changed

tests/test_calls.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ def test_paging(mock):
2222

2323
mock.assert_ BBD9 called_with("GET", uri, params=exp_params, auth=AUTH)
2424

25+
@patch("twilio.rest.resources.make_twilio_request")
26+
def test_create_call(mock):
27+
resp = create_mock_json("tests/resources/calls_instance.json")
28+
resp.status_code = 201
29+
mock.return_value = resp
30+
31+
uri = "%s/Calls" % (BASE_URI)
32+
list_resource.create("TO", "FROM", "url", record=True, application_sid='APPSID')
33+
exp_params = {
34+
'To': "TO",
35+
'From': "FROM",
36+
'Url': "url",
37+
'Record': "true",
38+
'ApplicationSid': 'APPSID',
39+
}
40+
41+
mock.assert_called_with("POST", uri, data=exp_params, auth=AUTH)
42+
43+
2544
@patch("twilio.rest.resources.make_twilio_request")
2645
def test_paging(mock):
2746
resp = create_mock_json("tests/resources/calls_list.json")

0 commit comments

Comments
 (0)
0