22Integration tests for Bandwidth's Voice Conferences API
33"""
44
5- from cgi import test
65import json
76import time
8- from typing import Dict , List , Tuple
7+ from typing import Dict , Tuple
98import unittest
109
1110from hamcrest import assert_that , has_properties , not_none , instance_of , greater_than
1211
13- import bandwidth
14- from bandwidth import ApiResponse
12+ from bandwidth import ApiClient , ApiResponse , Configuration
1513from bandwidth .api import calls_api
1614from bandwidth .models .create_call import CreateCall
1715from bandwidth .models .create_call_response import CreateCallResponse
18- from bandwidth .models .call_state import CallState
1916from bandwidth .models .call_state_enum import CallStateEnum
2017from bandwidth .models .update_call import UpdateCall
2118from bandwidth .models .redirect_method_enum import RedirectMethodEnum
@@ -41,32 +38,32 @@ def setUp(self):
4138 Set up for our tests by creating the CallsApi and ConferencesApi instances
4239 for testing as well as the unauthorized and forbidden credentials for the 4xx tests.
4340 """
44- configuration = bandwidth . Configuration (
45- username = BW_USERNAME ,
46- password = BW_PASSWORD
41+ configuration = Configuration (
42+ client_id = BW_CLIENT_ID ,
43+ client_secret = BW_CLIENT_SECRET
4744 )
48- api_client = bandwidth . ApiClient (configuration )
45+ api_client = ApiClient (configuration )
4946
5047 self .calls_api_instance = calls_api .CallsApi (api_client )
5148 self .conference_api_instance = conferences_api .ConferencesApi (api_client )
5249
53- unauthorizedConfiguration = bandwidth . Configuration (
50+ unauthorizedConfiguration = Configuration (
5451 username = 'bad_username' ,
5552 password = 'bad_password'
5653 )
57- unauthorized_api_client = bandwidth . ApiClient (unauthorizedConfiguration )
54+ unauthorized_api_client = ApiClient (unauthorizedConfiguration )
5855 self .unauthorized_api_instance = conferences_api .ConferencesApi (unauthorized_api_client )
5956
60- forbiddenConfiguration = bandwidth . Configuration (
57+ forbiddenConfiguration = Configuration (
6158 username = FORBIDDEN_USERNAME ,
6259 password = FORBIDDEN_PASSWORD
6360 )
64- forbidden_api_client = bandwidth . ApiClient (forbiddenConfiguration )
61+ forbidden_api_client = ApiClient (forbiddenConfiguration )
6562 self .forbidden_api_instance = conferences_api .ConferencesApi (forbidden_api_client )
6663
6764 # Rest client for interacting with Manteca
68- self .rest_client = RESTClientObject (bandwidth . Configuration .get_default_copy ())
69- configuration = bandwidth . Configuration (
65+ self .rest_client = RESTClientObject (Configuration .get_default_copy ())
66+ configuration = Configuration (
7067 username = BW_USERNAME ,
7168 password = BW_PASSWORD ,
7269 )
0 commit comments