Fokko commented on a change in pull request #4890: [AIRFLOW-4048] HttpSensor 
provide-context to response_check
URL: https://github.com/apache/airflow/pull/4890#discussion_r266258915
 
 

 ##########
 File path: tests/sensors/test_http_sensor.py
 ##########
 @@ -103,6 +103,32 @@ def resp_check(resp):
         self.assertEqual(prep_request.url, received_request.url)
         self.assertTrue(prep_request.method, received_request.method)
 
+    @patch("airflow.hooks.http_hook.requests.Session.send")
+    def test_poke_context(self, mock_session_send):
+        """
+        test provide_context
+        """
+        response = requests.Response()
+        response.status_code = 200
+        mock_session_send.return_value = response
+
+        def resp_check(resp, context):
 
 Review comment:
   If we make it part of a dag, we should be able to get the execution date etc.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to