@@ -45,6 +45,48 @@ def test_create(self):
4545 self .assertUrlEqual (
4646 self .get_voice_url ('Masking' , 'Session' ), self .client .current_request .url )
4747
48+ @with_response (201 )
49+ # create_session_with_single_party is passed
50+ def test_create (self ):
51+ self .client .masking_sessions .create_masking_session (
52+ first_party = '917708772011' ,
53+ create_session_with_single_party = True )
54+ self .assertEqual (self .client .current_request .method , 'POST' )
55+ self .assertUrlEqual (
56+ self .get_voice_url ('Masking' , 'Session' ), self .client .current_request .url )
57+
58+ @with_response (201 )
59+ # force_pin_authentication is passed
60+ def test_create (self ):
61+ self .client .masking_sessions .create_masking_session (
62+ first_party = '917708772011' ,
63+ second_party = '916303955746' ,
64+ is_pin_authentication_required = True ,
65+ first_party_pin = "1234" ,
66+ second_party_pin = "4321" ,
67+ pin_prompt_play = "https://file-examples.com/storage/fefda3519566d3360a0efb3/2017/11/file_example_MP3_700KB.mp3" ,
68+ pin_retry = 2 ,
69+ pin_retry_wait = 7 ,
70+ incorrect_pin_play = "https://file-examples.com/storage/fefda3519566d3360a0efb3/2017/11/file_example_MP3_700KB.mp3" ,
71+ unknown_caller_play = "https://file-examples.com/storage/fefda3519566d3360a0efb3/2017/11/file_example_MP3_700KB.mp3" ,
72+ force_pin_authentication = True ,
73+ session_expiry = 0 )
74+ self .assertEqual (self .client .current_request .method , 'POST' )
75+ self .assertUrlEqual (
76+ self .get_voice_url ('Masking' , 'Session' ), self .client .current_request .url )
77+
78+ @with_response (201 )
79+ # virtual_number_cooloff_period is passed
80+ def test_create (self ):
81+ self .client .masking_sessions .create_masking_session (
82+ first_party = '917708772011' ,
83+ second_party = '916303955746' ,
84+ virtual_number_cooloff_period = 3500 ,
85+ )
86+ self .assertEqual (self .client .current_request .method , 'POST' )
87+ self .assertUrlEqual (
88+ self .get_voice_url ('Masking' , 'Session' ), self .client .current_request .url )
89+
4890 @with_response (200 )
4991 def test_delete (self ):
5092 session_uuid = "9fe6cba9-62b2-4de0-98a4-6b878fb906de"
0 commit comments