From a1d64582a4a45e672706c79a6fc9df0364337f27 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 17:02:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/integration/conftest_kube.py | 1 - tests/integration/test_api.py | 4 ++-- tests/integration/test_jobs_service.py | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/conftest_kube.py b/tests/integration/conftest_kube.py index eebeb33c..203d3f01 100644 --- a/tests/integration/conftest_kube.py +++ b/tests/integration/conftest_kube.py @@ -20,7 +20,6 @@ class MyKubeClient(KubeClient): - # TODO (A Yushkovskiy, 30-May-2019) delete pods automatically async def create_pod(self, job_pod_descriptor: dict[str, Any]) -> str: diff --git a/tests/integration/test_api.py b/tests/integration/test_api.py index 4bb93592..952cb3ee 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 @@ -1401,7 +1402,6 @@ async def test_kill( jobs_client: JobsClient, infinite_job: str, ) -> None: - headers = jobs_client.headers url = monitoring_api.generate_kill_url(infinite_job) 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,