Skip to content

Commit bf787e0

Browse files
Update test_calls.py
1 parent 45d756f commit bf787e0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/integration/test_calls.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def assertApiException(self, context: ApiException, expectedException: ApiExcept
7373
def test_create_call(self):
7474
"""Validate a Create Call request with all optional parameters
7575
"""
76-
time.sleep(2)
76+
time.sleep(3)
7777
answer_url = BASE_CALLBACK_URL
7878
call_body = CreateCall(
7979
to=USER_NUMBER,
@@ -174,11 +174,11 @@ def test_create_call_forbidden(self) -> None:
174174
def test_get_call_state(self):
175175
"""Validate an Get Call State Request
176176
"""
177-
time.sleep(2)
178177
answer_url = BASE_CALLBACK_URL
179178
call_body = CreateCall(to=USER_NUMBER, _from=BW_NUMBER, application_id=BW_VOICE_APPLICATION_ID, answer_url=answer_url)
180179
create_call_response: CreateCallResponse = self.api_instance.create_call(BW_ACCOUNT_ID, call_body, _return_http_data_only=False)
181180
call_id = create_call_response[0].call_id
181+
time.sleep(3)
182182

183183
get_call_response: CallState = self.api_instance.get_call_state(BW_ACCOUNT_ID, call_id, _return_http_data_only=False)
184184

@@ -237,7 +237,7 @@ def test_get_call_state_not_found(self):
237237
def test_update_call(self):
238238
"""Validate an UpdateCall Request
239239
"""
240-
time.sleep(2)
240+
time.sleep(3)
241241
answer_url = MANTECA_BASE_URL + "/bxml/loop"
242242
call_body = CreateCall(to=MANTECA_IDLE_NUMBER, _from=MANTECA_ACTIVE_NUMBER, application_id=MANTECA_APPLICATION_ID, answer_url=answer_url)
243243
create_call_response: CreateCallResponse = self.api_instance.create_call(BW_ACCOUNT_ID, call_body, _return_http_data_only=False)
@@ -256,11 +256,12 @@ def test_update_call(self):
256256
)
257257
body2 = UpdateCall(state=CallStateEnum("completed"));
258258

259-
time.sleep(2)
259+
time.sleep(3)
260260
update_call_response: UpdateCall = self.api_instance.update_call(BW_ACCOUNT_ID, call_id, body, _return_http_data_only=False)
261261

262262
self.assertEqual(update_call_response[1], 200)
263263

264+
time.sleep(2)
264265
# hanging-up the call
265266
update_call_response: UpdateCall = self.api_instance.update_call(BW_ACCOUNT_ID, call_id, body2, _return_http_data_only=False)
266267
self.assertEqual(update_call_response[1], 200)
@@ -338,7 +339,7 @@ def test_update_call_not_found(self):
338339
def test_update_call_bxml(self):
339340
"""Validate an UpdateCallBxml Request
340341
"""
341-
time.sleep(2)
342+
342343
answer_url = MANTECA_BASE_URL + "/bxml/loop"
343344
call_body = CreateCall(to=MANTECA_IDLE_NUMBER, _from=MANTECA_ACTIVE_NUMBER, application_id=MANTECA_APPLICATION_ID, answer_url=answer_url)
344345
create_call_response: CreateCallResponse = self.api_instance.create_call(BW_ACCOUNT_ID, call_body, _return_http_data_only=False)
@@ -349,7 +350,8 @@ def test_update_call_bxml(self):
349350
update_call_bxml_response: UpdateCall = self.api_instance.update_call_bxml(BW_ACCOUNT_ID, call_id, body, _return_http_data_only=False)
350351

351352
self.assertEqual(update_call_bxml_response[1], 204)
352-
353+
354+
time.sleep(2)
353355
# hanging-up the call
354356
body2 = UpdateCall(state=CallStateEnum("completed"))
355357
update_call_response: UpdateCall = self.api_instance.update_call(BW_ACCOUNT_ID, call_id, body2, _return_http_data_only=False)

0 commit comments

Comments
 (0)