@@ -102,6 +102,7 @@ def setUp(self):
102
102
}
103
103
104
104
def tearDown (self ):
105
+ del self .api
105
106
pass
106
107
107
108
@staticmethod
@@ -146,7 +147,7 @@ def test_get_visits_correct_data(self):
146
147
self .api .get_visits (mock_file2 )
147
148
148
149
def test_get_visits_error_403 (self ):
149
- """Test checks correct code run result in case of 403 error"""
150
+ """Test checks correct code run result in case of 403 error for get_visits method """
150
151
mock_pool = MockPoolManager (self )
151
152
self .api .api_client .rest_client .pool_manager = mock_pool
152
153
mock_file = 'get_visits_403_error.json'
@@ -160,7 +161,7 @@ def test_get_visits_error_403(self):
160
161
self .assertIsInstance (context .exception .structured_error , ErrorVisits403 )
161
162
162
163
def test_get_visits_error_429 (self ):
163
- """Test checks correct code run result in case of 429 error"""
164
+ """Test checks correct code run result in case of 429 error for get_visits method """
164
165
mock_pool = MockPoolManager (self )
165
166
self .api .api_client .rest_client .pool_manager = mock_pool
166
167
mock_file = 'get_visits_429_too_many_requests_error.json'
@@ -174,7 +175,7 @@ def test_get_visits_error_429(self):
174
175
self .assertEqual (context .exception .structured_error .retry_after , 4 )
175
176
176
177
def test_get_visits_error_429_empty_retry_after (self ):
177
- """Test checks correct code run result in case of 429 error"""
178
+ """Test checks retry after value in exception in case of 429 error for get_visits method """
178
179
mock_pool = MockPoolManager (self )
179
180
self .api .api_client .rest_client .pool_manager = mock_pool
180
181
mock_file = 'get_visits_429_too_many_requests_error_empty_header.json'
@@ -232,7 +233,7 @@ def test_get_event_errors_200(self):
232
233
self .api .get_event (mock_file_all_errors )
233
234
234
235
def test_get_event_error_403 (self ):
235
- """Test checks correct code run result in case of 403 error"""
236
+ """Test checks correct code run result in case of 403 error for get_event method """
236
237
mock_pool = MockPoolManager (self )
237
238
self .api .api_client .rest_client .pool_manager = mock_pool
238
239
mock_file = 'get_event_403_error.json'
@@ -245,7 +246,7 @@ def test_get_event_error_403(self):
245
246
self .assertIsInstance (context .exception .structured_error , ErrorCommon403Response )
246
247
247
248
def test_get_event_error_404 (self ):
248
- """Test checks correct code run result in case of 403 error"""
249
+ """Test checks correct code run result in case of 404 error for get_event method """
249
250
mock_pool = MockPoolManager (self )
250
251
self .api .api_client .rest_client .pool_manager = mock_pool
251
252
mock_file = 'get_event_404_error.json'
@@ -306,6 +307,7 @@ def test_init_with_region(self):
306
307
regions_list = ["us" , "eu" , "ap" ]
307
308
for region in regions_list :
308
309
configuration = Configuration (api_key = API_KEY , region = region )
310
+ del self .api
309
311
self .api = FingerprintApi (configuration ) # noqa: E501
310
312
mock_pool = MockPoolManager (self )
311
313
self .api .api_client .rest_client .pool_manager = mock_pool
@@ -427,7 +429,7 @@ def test_update_event(self):
427
429
self .api .update_event (update_body , mock_file )
428
430
429
431
def test_update_event_400_error (self ):
430
- """Test that delete visit method returns 400 error"""
432
+ """Test that update event method returns 400 error"""
431
433
mock_pool = MockPoolManager (self )
432
434
self .api .api_client .rest_client .pool_manager = mock_pool
433
435
0 commit comments