airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] feluelle commented on a change in pull request #6100: [AIRFLOW-5387] Fix show paused pagination bug
Date Tue, 17 Sep 2019 09:29:52 GMT
feluelle commented on a change in pull request #6100: [AIRFLOW-5387] Fix show paused pagination
bug
URL: https://github.com/apache/airflow/pull/6100#discussion_r325068682
 
 

 ##########
 File path: tests/www/test_utils.py
 ##########
 @@ -103,14 +105,45 @@ def test_params_search(self):
         self.assertEqual('search=bash_',
                          utils.get_params(search='bash_'))
 
-    def test_params_showPaused_true(self):
-        """Should detect True as default for showPaused"""
-        self.assertEqual('',
-                         utils.get_params(showPaused=True))
-
-    def test_params_showPaused_false(self):
-        self.assertEqual('showPaused=False',
-                         utils.get_params(showPaused=False))
+    @parameterized.expand([
+        (True, False, ''),
+        (False, True, ''),
+        (True, True, 'showPaused=True'),
+        (False, False, 'showPaused=False'),
+        (None, True, ''),
+        (None, False, ''),
+    ])
+    def test_params_showPaused(self, show_paused, hide_by_default, expected_result):
+        os.environ['AIRFLOW__WEBSERVER__HIDE_PAUSED_DAGS_BY_DEFAULT'] = str(hide_by_default)
+
+        try:
 
 Review comment:
   Why did you enclose it in a `try-finally` block?

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

Mime
View raw message