ashb 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_r278064574
##########
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:
`assertListEqual` given you are sorting the items anyway?
----------------------------------------------------------------
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