Skip to content

Commit b444b14

Browse files
committed
Fix warnings
1 parent 41d7843 commit b444b14

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/aio/test_aio_client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async def test_launch_url_get(aio_client, launch_mode: str, project_name: str, e
146146
response.is_success = True
147147
response.json.side_effect = lambda: {'mode': launch_mode, 'id': LAUNCH_ID}
148148

149-
async def get_call(*args, **kwargs):
149+
async def get_call(*_, **__):
150150
return response
151151

152152
(await aio_client.session()).get.side_effect = get_call
@@ -365,31 +365,31 @@ async def test_launch_uuid_print_default_print(mock_stdout):
365365
assert 'ReportPortal Launch UUID: ' not in mock_stdout.getvalue()
366366

367367

368-
def connection_error(*args, **kwargs):
368+
def connection_error(*_, **__):
369369
raise ServerConnectionError()
370370

371371

372-
def json_error(*args, **kwargs):
372+
def json_error(*_, **__):
373373
raise JSONDecodeError('invalid Json', '502 Gateway Timeout', 0)
374374

375375

376-
def response_error(*args, **kwargs):
376+
def response_error(*_, **__):
377377
result = mock.AsyncMock()
378378
result.ok = False
379379
result.json.side_effect = json_error
380380
result.status_code = 502
381381
return result
382382

383383

384-
def invalid_response(*args, **kwargs):
384+
def invalid_response(*_, **__):
385385
result = mock.AsyncMock()
386386
result.ok = True
387387
result.json.side_effect = json_error
388388
result.status_code = 200
389389
return result
390390

391391

392-
def request_error(*args, **kwargs):
392+
def request_error(*_, **__):
393393
raise ValueError()
394394

395395

@@ -417,7 +417,7 @@ async def test_connection_errors(aio_client, requests_method, client_method,
417417
await getattr(aio_client, client_method)(*client_params)
418418
except Exception as e:
419419
# On this level we pass all errors through by design
420-
assert type(e) == ServerConnectionError
420+
assert type(e) is ServerConnectionError
421421

422422
getattr(await aio_client.session(), requests_method).side_effect = response_error
423423
result = await getattr(aio_client, client_method)(*client_params)

0 commit comments

Comments
 (0)