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_r325128932
 
 

 ##########
 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:
   @alrolorojas Thank you - makes sense. But yes the context manager would be 
probably nicer to use 👍 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to