Taragolis commented on code in PR #39928:
URL: https://github.com/apache/airflow/pull/39928#discussion_r1620654175


##########
tests/providers/weaviate/operators/test_weaviate.py:
##########
@@ -33,12 +34,16 @@
 class TestWeaviateIngestOperator:
     @pytest.fixture
     def operator(self):
-        return WeaviateIngestOperator(
-            task_id="weaviate_task",
-            conn_id="weaviate_conn",
-            class_name="my_class",
-            input_json=[{"data": "sample_data"}],
-        )
+        with pytest.warns(
+            AirflowProviderDeprecationWarning,
+            match="Passing 'input_json' to WeaviateIngestOperator is 
deprecated and you should use 'input_data' instead",
+        ):
+            return WeaviateIngestOperator(
+                task_id="weaviate_task",
+                conn_id="weaviate_conn",
+                class_name="my_class",
+                input_json=[{"data": "sample_data"}],
+            )

Review Comment:
   This functional is deprecated that means that no need to provide this in 
operator in every test which required this fixture, so better rewrite this 
fixture to avoid to use deprecated functional in regular testing.
   
   We still want to test deprecated functional anyway, so we need to create 
separate test case(s) where we test only deprecated stuff



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to