File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class TestPlay(TwilioTest):
120
120
def test_empty_play (self ):
121
121
""" should play hello monkey """
122
122
r = VoiceResponse ()
123
- r .play ('' )
123
+ r .play ()
124
124
125
125
assert_equal (
126
126
self .strip (r ),
@@ -130,7 +130,7 @@ def test_empty_play(self):
130
130
def test_play_hello (self ):
131
131
""" should play hello monkey """
132
132
r = VoiceResponse ()
133
- r .play ('http://hellomonkey.mp3' )
133
+ r .play (url = 'http://hellomonkey.mp3' )
134
134
135
135
assert_equal (
136
136
self .strip (r ),
@@ -140,7 +140,7 @@ def test_play_hello(self):
140
140
def test_play_hello_loop (self ):
141
141
""" should play hello monkey loop """
142
142
r = VoiceResponse ()
143
- r .play ('http://hellomonkey.mp3' , loop = 3 )
143
+ r .play (url = 'http://hellomonkey.mp3' , loop = 3 )
144
144
145
145
assert_equal (
146
146
self .strip (r ),
@@ -150,7 +150,7 @@ def test_play_hello_loop(self):
150
150
def test_play_digits (self ):
151
151
""" should play digits """
152
152
r = VoiceResponse ()
153
- r .play ('' , digits = 'w123' )
153
+ r .play (digits = 'w123' )
154
154
155
155
assert_equal (
156
156
self .strip (r ),
@@ -579,7 +579,7 @@ def test_nested_say_play_pause(self):
579
579
""" a gather with a say, play, and pause """
580
580
g = Gather ()
581
581
g .say ('Hey' )
582
- g .play ('hey.mp3' )
582
+ g .play (url = 'hey.mp3' )
583
583
g .pause ()
584
584
585
585
r = VoiceResponse ()
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ def pause(self, length=None):
164
164
return self .append (Pause (length = length ))
165
165
166
166
def play (self ,
167
- url ,
167
+ url = None ,
168
168
loop = None ,
169
169
digits = None ,
170
170
** kwargs ):
@@ -178,7 +178,7 @@ def play(self,
178
178
:return: <Play> element
179
179
"""
180
180
return self .append (Play (
181
- url ,
181
+ url = url ,
182
182
loop = loop ,
183
183
digits = digits ,
184
184
** kwargs
@@ -697,7 +697,7 @@ def say(self,
697
697
))
698
698
699
699
def play (self ,
700
- url ,
700
+ url = None ,
701
701
loop = None ,
702
702
digits = None ,
703
703
** kwargs ):
@@ -711,7 +711,7 @@ def play(self,
711
711
:return: <Play> element
712
712
"""
713
713
return self .append (Play (
714
- url ,
714
+ url = url ,
715
715
loop = loop ,
716
716
digits = digits ,
717
717
** kwargs
@@ -738,12 +738,12 @@ class Play(TwiML):
738
738
"""
739
739
<Play> element
740
740
"""
741
- def __init__ (self , url , ** kwargs ):
741
+ def __init__ (self , url = None , ** kwargs ):
742
742
"""
743
743
Create a new <Play> element
744
744
745
- :param url: media URL
746
- :param kwargs: additional attributes
745
+ :param url: optional media URL
746
+ :param kwargs: attributes
747
747
"""
748
748
super (Play , self ).__init__ (** kwargs )
749
749
self .value = url
You can’t perform that action at this time.
0 commit comments