@@ -146,7 +146,7 @@ async def test_launch_url_get(aio_client, launch_mode: str, project_name: str, e
146
146
response .is_success = True
147
147
response .json .side_effect = lambda : {'mode' : launch_mode , 'id' : LAUNCH_ID }
148
148
149
- async def get_call (* args , ** kwargs ):
149
+ async def get_call (* _ , ** __ ):
150
150
return response
151
151
152
152
(await aio_client .session ()).get .side_effect = get_call
@@ -365,31 +365,31 @@ async def test_launch_uuid_print_default_print(mock_stdout):
365
365
assert 'ReportPortal Launch UUID: ' not in mock_stdout .getvalue ()
366
366
367
367
368
- def connection_error (* args , ** kwargs ):
368
+ def connection_error (* _ , ** __ ):
369
369
raise ServerConnectionError ()
370
370
371
371
372
- def json_error (* args , ** kwargs ):
372
+ def json_error (* _ , ** __ ):
373
373
raise JSONDecodeError ('invalid Json' , '502 Gateway Timeout' , 0 )
374
374
375
375
376
- def response_error (* args , ** kwargs ):
376
+ def response_error (* _ , ** __ ):
377
377
result = mock .AsyncMock ()
378
378
result .ok = False
379
379
result .json .side_effect = json_error
380
380
result .status_code = 502
381
381
return result
382
382
383
383
384
- def invalid_response (* args , ** kwargs ):
384
+ def invalid_response (* _ , ** __ ):
385
385
result = mock .AsyncMock ()
386
386
result .ok = True
387
387
result .json .side_effect = json_error
388
388
result .status_code = 200
389
389
return result
390
390
391
391
392
- def request_error (* args , ** kwargs ):
392
+ def request_error (* _ , ** __ ):
393
393
raise ValueError ()
394
394
395
395
@@ -417,7 +417,7 @@ async def test_connection_errors(aio_client, requests_method, client_method,
417
417
await getattr (aio_client , client_method )(* client_params )
418
418
except Exception as e :
419
419
# On this level we pass all errors through by design
420
- assert type (e ) == ServerConnectionError
420
+ assert type (e ) is ServerConnectionError
421
421
422
422
getattr (await aio_client .session (), requests_method ).side_effect = response_error
423
423
result = await getattr (aio_client , client_method )(* client_params )
0 commit comments