8000 Added a couple more tests · kevindias/twilio-python@4bba819 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 4bba819

Browse files
author
Kyle Conroy
committed
Added a couple more tests
1 parent 5f154c4 commit 4bba819

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/twimltests.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,22 @@ def testConvience(self):
254254
def testBadAppend(self):
255255
""" should raise exceptions for wrong appending"""
256256
self.improperAppend(twilio.Sms("Hello"))
257+
258+
class TestDial(TwilioTest):
259+
260+
def testDial(self):
261+
""" should redirect the call"""
262+
r = twilio.Response()
263+
r.append(twilio.Dial("1231231234"))
264+
r = self.strip(r)
265+
self.assertEquals(r, '<Response><Dial>1231231234</Dial></Response>')
266+
267+
def testConvienceMethod(self):
268+
""" should dial to a url via post"""
269+
r = twilio.Response()
270+
r.addDial()
271+
r = self.strip(r)
272+
self.assertEquals(r, '<Response><Dial/></Response>')
257273

258274
if __name__ == '__main__':
259275
unittest.main()

0 commit comments

Comments
 (0)
0