From f9b45dc3d493b2c586da8ffc26060166a4bd0105 Mon Sep 17 00:00:00 2001 From: matarpeles Date: Sun, 29 Oct 2023 15:01:17 +0200 Subject: [PATCH] fixed lint errors --- app/invokers/gitlab_pipeline_invoker.py | 3 ++- .../processors/kafka/test_kafka_to_gitlab_processor.py | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/invokers/gitlab_pipeline_invoker.py b/app/invokers/gitlab_pipeline_invoker.py index eb3b02f..0e979fd 100644 --- a/app/invokers/gitlab_pipeline_invoker.py +++ b/app/invokers/gitlab_pipeline_invoker.py @@ -14,7 +14,8 @@ def invoke(self, body: dict, project_path: str) -> None: logger.info("GitLabPipelineInvoker - start - project: %s", project_path) res = requests.post( - f"{settings.GITLAB_URL}/api/v4/projects/{urllib.parse.quote(project_path, safe='')}/trigger/pipeline", + f"{settings.GITLAB_URL}/api/v4/projects/" + f"{urllib.parse.quote(project_path, safe='')}/trigger/pipeline", json=body, timeout=settings.GITLAB_PIPELINE_INVOKER_TIMEOUT, ) diff --git a/tests/unit/processors/kafka/test_kafka_to_gitlab_processor.py b/tests/unit/processors/kafka/test_kafka_to_gitlab_processor.py index c118d51..0eeed2b 100644 --- a/tests/unit/processors/kafka/test_kafka_to_gitlab_processor.py +++ b/tests/unit/processors/kafka/test_kafka_to_gitlab_processor.py @@ -205,9 +205,7 @@ def test_single_stream_with_subgroup_in_project_name( ) -> None: Timer(0.01, terminate_consumer).start() - with mock.patch.object(consumer_logger, "error") as mock_error, mock.patch.object( - gitlab_processor_logger, "info" - ) as mock_info: + with mock.patch.object(gitlab_processor_logger, "info") as mock_info: streamer = KafkaStreamer(Consumer()) streamer.stream() @@ -249,9 +247,7 @@ def test_single_stream_with_subgroup_in_project_name_failure( ) -> None: Timer(0.01, terminate_consumer).start() - with mock.patch.object(consumer_logger, "error") as mock_error, mock.patch.object( - gitlab_processor_logger, "info" - ) as mock_info: + with mock.patch.object(gitlab_processor_logger, "info") as mock_info: streamer = KafkaStreamer(Consumer()) streamer.stream()