You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/03/16 13:23:24 UTC

[GitHub] [airflow] raphaelauv commented on a change in pull request #4890: [AIRFLOW-4048] HttpSensor provide-context to response_check

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

 ##########
 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:
   Yes , but in the tests the context is empty , the mock do not provide any context...

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services