kaxil commented on code in PR #48244:
URL: https://github.com/apache/airflow/pull/48244#discussion_r2018090816


##########
providers/http/tests/unit/http/sensors/test_http.py:
##########
@@ -317,8 +319,25 @@ def test_get_response_check(self):
         )
         op.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, 
ignore_ti_state=True)
 
+    @pytest.mark.skipif(not AIRFLOW_V_3_0_PLUS, reason="Test only for Airflow 
3.0+")
+    @mock.patch("airflow.providers.http.hooks.http.Session", FakeSession)
+    def test_sensor(self, run_task):
+        sensor = HttpSensor(
+            task_id="http_sensor_check",
+            http_conn_id="http_default",
+            endpoint="/search",
+            request_params={"client": "ubuntu", "q": "airflow", "date": 
"{{ds}}"},
+            headers={},
+            response_check=lambda response: 
f"apache/airflow/{DEFAULT_DATE:%Y-%m-%d}" in response.text,
+            poke_interval=5,
+            timeout=15,
+            dag=self.dag,
+        )
+        run_task(sensor)

Review Comment:
   Naah, just that there is no exception raised is enough -- also retain 
previous test behaviour



-- 
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