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
<
10000
/td>
- r .play ('' , digits = 'w123' )
153
+ r .play (digits = 'w123' )
154
154
155
155
assert_equal (
156
156
self .strip (r ),
@@ -560,7 +560,7 @@ def test_nested_say_play_pause(self):
560
560
""" a gather with a say, play, and pause """
561
561
g = Gather ()
562
562
g .say ('Hey' )
563
- g .play ('hey.mp3' )
563
+ g .play (url = 'hey.mp3' )
564
564
g .pause ()
565
565
566
566
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
@@ -696,7 +696,7 @@ def say(self,
696
696
))
697
697
698
698
def play (self ,
699
- url ,
699
+ url = None ,
700
700
loop = None ,
701
701
digits = None ,
702
702
** kwargs ):
@@ -710,7 +710,7 @@ def play(self,
710
710
:return: <Play> element
711
711
"""
712
712
return self .append (Play (
713
- url ,
713
+ url = url ,
714
714
loop = loop ,
715
715
digits = digits ,
716
716
** kwargs
@@ -737,12 +737,12 @@ class Play(TwiML):
737
737
"""
738
738
<Play> element
739
739
"""
740
- def __init__ (self , url , ** kwargs ):
740
+ def __init__ (self , url = None , ** kwargs ):
741
741
"""
742
742
Create a new <Play> element
743
743
744
- :param url: media URL
745
- :param kwargs: additional attributes
744
+ :param url: optional media URL
745
+ :param kwargs: attributes
746
746
"""
747
747
super (Play , self ).__init__ (** kwargs )
748
748
self .value = url
You can’t perform that action at this time.
0 commit comments