8000 Variable name cleanup · twilio/twilio-python@30a6b58 · GitHub
[go: up one dir, main page]

Skip to content

Commit 30a6b58

Browse files
committed
Variable name cleanup
1 parent 2eeda68 commit 30a6b58

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

tests/test_twiml.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,15 @@ def testSip(self):
419419
r = self.strip(r)
420420
self.assertEquals(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Dial><Sip>foo@example.com</Sip></Dial></Response>')
421421

422+
def testSipUsernamePass(self):
423+
""" should redirect the call"""
424+
r = Response()
425+
d = r.dial()
426+
d.sip('foo@example.com', username='foo', password='bar')
427+
r = self.strip(r)
428+
self.assertEquals(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Dial><Sip password="bar" username="foo">foo@example.com</Sip></Dial></Response>')
429+
430+
422431
def testSipUri(self):
423432
""" should redirect the call"""
424433
r = Response()

twilio/twiml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ def conference(self, name, **kwargs):
412412
def queue(self, name, **kwargs):
413413
return self.append(Queue(name, **kwargs))
414414

415-
def sip(self, name=None, **kwargs):
416-
return self.append(Sip(name, **kwargs))
415+
def sip(self, sip_address=None, **kwargs):
416+
return self.append(Sip(sip_address, **kwargs))
417417

418418
def addNumber(self, *args, **kwargs):
419419
return self.number(*args, **kwargs)
@@ -509,7 +509,7 @@ def headers(self, headers):
509509

510510

511511
class Uri(Verb):
512-
"""A collection of headers"""
512+
"""A uniform resource indentifier"""
513513
def __init__(self, uri, **kwargs):
514514
super(Uri, self).__init__(**kwargs)
515515
self.body = uri

0 commit comments

Comments
 (0)
0