8000 Add test case to ensure filtering is applied on `Calls.iter` method. · Twilio-api/twilio-python@44429e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 44429e7

Browse files
committed
Add test case to ensure filtering is applied on Calls.iter method.
1 parent 840ea84 commit 44429e7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_calls.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ def test_paging(mock):
4343
mock.assert_called_with("GET", uri, params=exp_params, auth=AUTH)
4444

4545

46+
@patch("twilio.rest.resources.base.make_twilio_request")
47+
def test_paging_iter(mock):
48+
resp = create_mock_json("tests/resources/calls_list.json")
49+
mock.return_value = resp
50+
51+
uri = "%s/Calls" % (BASE_URI)
52+
list_resource.iter(started_before=date(2010, 12, 5)).next()
53+
exp_params = {'StartTime<': '2010-12-05'}
54+
55+
mock.assert_called_with("GET", uri, params=exp_params, auth=AUTH)
56+
57+
4658
@patch("twilio.rest.resources.base.make_twilio_request")
4759
def test_get(mock):
4860
resp = create_mock_json("tests/resources/calls_instance.json")

0 commit comments

Comments
 (0)
0