You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ta...@apache.org on 2023/02/18 20:45:23 UTC

[airflow] branch main updated: migrated all providers/apache/flink to pytest (#29604)

This is an automated email from the ASF dual-hosted git repository.

taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8d58c7211e migrated all providers/apache/flink to pytest (#29604)
8d58c7211e is described below

commit 8d58c7211e219d6638869055983d3b876c75e02a
Author: Abhishek-kumar-samsung <bi...@gmail.com>
AuthorDate: Sun Feb 19 02:15:11 2023 +0530

    migrated all providers/apache/flink to pytest (#29604)
---
 tests/providers/apache/flink/operators/test_flink_kubernetes.py | 5 ++---
 tests/providers/apache/flink/sensors/test_flink_kubernetes.py   | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/providers/apache/flink/operators/test_flink_kubernetes.py b/tests/providers/apache/flink/operators/test_flink_kubernetes.py
index f660eabf98..598c6edd94 100644
--- a/tests/providers/apache/flink/operators/test_flink_kubernetes.py
+++ b/tests/providers/apache/flink/operators/test_flink_kubernetes.py
@@ -20,7 +20,6 @@
 from __future__ import annotations
 
 import json
-import unittest
 from unittest.mock import patch
 
 from airflow import DAG
@@ -183,8 +182,8 @@ TEST_APPLICATION_DICT = {
 
 
 @patch("airflow.providers.cncf.kubernetes.hooks.kubernetes.KubernetesHook.get_conn")
-class TestFlinkKubernetesOperator(unittest.TestCase):
-    def setUp(self):
+class TestFlinkKubernetesOperator:
+    def setup_method(self):
         db.merge_conn(
             Connection(conn_id="kubernetes_default_kube_config", conn_type="kubernetes", extra=json.dumps({}))
         )
diff --git a/tests/providers/apache/flink/sensors/test_flink_kubernetes.py b/tests/providers/apache/flink/sensors/test_flink_kubernetes.py
index 9978a7de6e..6196083e39 100644
--- a/tests/providers/apache/flink/sensors/test_flink_kubernetes.py
+++ b/tests/providers/apache/flink/sensors/test_flink_kubernetes.py
@@ -20,7 +20,6 @@
 from __future__ import annotations
 
 import json
-import unittest
 from unittest.mock import patch
 
 import pytest
@@ -863,8 +862,8 @@ TASK_MANAGER_POD_LIST = V1PodList(api_version="v1", items=[TASK_MANAGER_POD], ki
 
 
 @patch("airflow.providers.cncf.kubernetes.hooks.kubernetes.KubernetesHook.get_conn")
-class TestFlinkKubernetesSensor(unittest.TestCase):
-    def setUp(self):
+class TestFlinkKubernetesSensor:
+    def setup_method(self):
         db.merge_conn(Connection(conn_id="kubernetes_default", conn_type="kubernetes", extra=json.dumps({})))
         db.merge_conn(
             Connection(