def test_pause(self): args = self.parser.parse_args(['dags', 'pause', 'example_bash_operator']) dag_command.dag_pause(args) assert self.dagbag.dags['example_bash_operator'].get_is_paused() in [True, 1] args = self.parser.parse_args(['dags', 'unpause', 'example_bash_operator']) dag_command.dag_unpause(args) assert self.dagbag.dags['example_bash_operator'].get_is_paused() in [False, 0]
def test_pause(self): args = self.parser.parse_args([ 'dags', 'pause', 'example_bash_operator']) dag_command.dag_pause(args) self.assertIn(self.dagbag.dags['example_bash_operator'].is_paused, [True, 1]) args = self.parser.parse_args([ 'dags', 'unpause', 'example_bash_operator']) dag_command.dag_unpause(args) self.assertIn(self.dagbag.dags['example_bash_operator'].is_paused, [False, 0])