raviagarwalunravel commented on a change in pull request #5118: [AIRFLOW-4315] 
Add monitoring API's to airflow
URL: https://github.com/apache/airflow/pull/5118#discussion_r278053117
 
 

 ##########
 File path: tests/www/api/experimental/test_endpoints.py
 ##########
 @@ -77,6 +140,24 @@ def test_task_info(self):
         self.assertNotIn('error', response.data.decode('utf-8'))
         self.assertEqual(200, response.status_code)
 
+        # Check for upstearm and downstearm task list
+        response = self.client.get(
+            url_template.format('example_bash_operator', 'run_after_loop')
+        )
+        self.assertNotIn('error', response.data.decode('utf-8'))
+        self.assertEqual(200, response.status_code)
+        response_content = json.loads(response.data.decode('utf-8'))
+
+        self.assertIn('"upstream_task_ids"', response.data.decode('utf-8'))
+        expected_upstream_task_list = ["runme_2", "runme_1", "runme_0"]
+        self.assertItemsEqual(sorted(response_content['upstream_task_ids']),
 
 Review comment:
   I can see a equivalent method in python 3.6 as assertCountEqual, but wont 
these test cases fail for python 2.x then? or do the tests not care about 
earlier python versions?
   

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