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 2020/05/02 16:54:26 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #8607: Remove config side effects

kaxil commented on a change in pull request #8607:
URL: https://github.com/apache/airflow/pull/8607#discussion_r418981103



##########
File path: tests/www/test_views.py
##########
@@ -523,9 +523,9 @@ def test_task_stats(self):
         self.assertEqual(resp.status_code, 200)
 
     def test_task_stats_only_noncompleted(self):

Review comment:
       How about we change this too?
   
   ```suggestion
       @conf_vars({("webserver", "show_recent_stats_for_completed_runs"): "False"})
       def test_task_stats_only_noncompleted(self):
   ```

##########
File path: tests/www/test_views.py
##########
@@ -523,9 +523,9 @@ def test_task_stats(self):
         self.assertEqual(resp.status_code, 200)
 
     def test_task_stats_only_noncompleted(self):
-        conf.set("webserver", "show_recent_stats_for_completed_runs", "False")
-        resp = self.client.post('task_stats', follow_redirects=True)
-        self.assertEqual(resp.status_code, 200)
+        with conf_vars({("webserver", "show_recent_stats_for_completed_runs"): "False"}):

Review comment:
       ```suggestion
           with conf_vars({("webserver", "show_recent_stats_for_completed_runs"): "False"}):
   ```




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