ashb commented on a change in pull request #6684: [AIRFLOW-6095] Filter dags
returned by task_stats
URL: https://github.com/apache/airflow/pull/6684#discussion_r352556361
##########
File path: tests/www/test_views.py
##########
@@ -1405,6 +1405,20 @@ def test_task_stats_success_for_all_dag_user(self):
self.check_content_in_response('example_bash_operator', resp)
self.check_content_in_response('example_subdag_operator', resp)
+ def test_task_stats_success_when_selecting_dags(self):
+ self.logout()
+ self.login(username='all_dag_user',
+ password='all_dag_user')
+ resp = self.client.get('task_stats?dag_ids=example_subdag_operator',
follow_redirects=True)
+ self.check_content_not_in_response('example_bash_operator', resp)
+ self.check_content_in_response('example_subdag_operator', resp)
+
+ # Multiple
+ resp =
self.client.get('task_stats?dag_ids=example_subdag_operator,example_bash_operator',
+ follow_redirects=True)
+ self.check_content_in_response('example_bash_operator', resp)
+ self.check_content_in_response('example_subdag_operator', resp)
Review comment:
Check that something else isn't in this response.
Also it would be better if you could check the JSON response, not just that
the string appears in the response.
----------------------------------------------------------------
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