From 88da1a34368f350378beb05a7fcc3c13e331af49 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 16:55:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/integration/test_api.py | 3 ++- tests/integration/test_jobs_service.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_api.py b/tests/integration/test_api.py index 4bb93592..bee1e12b 100644 --- a/tests/integration/test_api.py +++ b/tests/integration/test_api.py @@ -1037,7 +1037,8 @@ async def test_attach_forbidden( async with client.ws_connect(url): pass except WSServerHandshakeError as e: - assert e.headers and e.headers.get("X-Error") + assert e.headers + assert e.headers.get("X-Error") assert e.message == "Invalid response status" assert e.status == HTTPUnauthorized.status_code diff --git a/tests/integration/test_jobs_service.py b/tests/integration/test_jobs_service.py index b9b60345..26a6a18a 100644 --- a/tests/integration/test_jobs_service.py +++ b/tests/integration/test_jobs_service.py @@ -317,7 +317,8 @@ async def test_save_commit_fails_with_exception( async def test_get_available_jobs_count(self, jobs_service: JobsService) -> None: result = await jobs_service.get_available_jobs_counts() - assert result and "cpu-small" in result + assert result + assert "cpu-small" in result async def test_mark_logs_dropped( self,