1818from bandwidth .models .endpoint_type_enum import EndpointTypeEnum
1919from bandwidth .models .endpoint_direction_enum import EndpointDirectionEnum
2020from bandwidth .models .endpoint_status_enum import EndpointStatusEnum
21- from bandwidth .exceptions import UnauthorizedException , ForbiddenException , NotFoundException
21+ from bandwidth .exceptions import UnauthorizedException , NotFoundException
2222from test .utils .env_variables import *
2323
2424
@@ -40,12 +40,6 @@ def setUpClass(cls) -> None:
4040 )
4141 cls .unauthorized_api_instance = EndpointsApi (ApiClient (unauthorized_configuration ))
4242
43- forbidden_configuration = Configuration (
44- username = FORBIDDEN_USERNAME ,
45- password = FORBIDDEN_PASSWORD
46- )
47- cls .forbidden_api_instance = EndpointsApi (ApiClient (forbidden_configuration ))
48-
4943 cls .account_id = BW_ACCOUNT_ID
5044 cls .test_endpoint_id = 'endpoint-id'
5145
@@ -180,44 +174,18 @@ def test_create_endpoint_unauthorized(self):
180174
181175 self .assertApiException (context , 401 )
182176
183- def test_create_endpoint_forbidden (self ):
184- create_request = CreateWebRtcConnectionRequest (
185- type = EndpointTypeEnum .WEBRTC ,
186- direction = EndpointDirectionEnum .BIDIRECTIONAL
187- )
188-
189- with self .assertRaises (ForbiddenException ) as context :
190- self .forbidden_api_instance .create_endpoint (
191- self .account_id ,
192- create_request
193- )
194-
195- self .assertApiException (context , 403 )
196-
197177 def test_list_endpoints_unauthorized (self ):
198178 with self .assertRaises (UnauthorizedException ) as context :
199179 self .unauthorized_api_instance .list_endpoints (self .account_id )
200180
201181 self .assertApiException (context , 401 )
202182
203- def test_list_endpoints_forbidden (self ):
204- with self .assertRaises (ForbiddenException ) as context :
205- self .forbidden_api_instance .list_endpoints (self .account_id )
206-
207- self .assertApiException (context , 403 )
208-
209183 def test_get_endpoint_unauthorized (self ):
210184 with self .assertRaises (UnauthorizedException ) as context :
211185 self .unauthorized_api_instance .get_endpoint (self .account_id , self .test_endpoint_id )
212186
213187 self .assertApiException (context , 401 )
214188
215- def test_get_endpoint_forbidden (self ):
216- with self .assertRaises (ForbiddenException ) as context :
217- self .forbidden_api_instance .get_endpoint (self .account_id , self .test_endpoint_id )
218-
219- self .assertApiException (context , 403 )
220-
221189 def test_get_endpoint_not_found (self ):
222190 with self .assertRaises (NotFoundException ) as context :
223191 self .endpoints_api_instance .get_endpoint (self .account_id , self .test_endpoint_id )
@@ -230,12 +198,6 @@ def test_delete_endpoint_unauthorized(self):
230198
231199 self .assertApiException (context , 401 )
232200
233- def test_delete_endpoint_forbidden (self ):
234- with self .assertRaises (ForbiddenException ) as context :
235- self .forbidden_api_instance .delete_endpoint (self .account_id , self .test_endpoint_id )
236-
237- self .assertApiException (context , 403 )
238-
239201 def test_delete_endpoint_not_found (self ):
240202 with self .assertRaises (NotFoundException ) as context :
241203 self .endpoints_api_instance .delete_endpoint (self .account_id , self .test_endpoint_id )
0 commit comments