Skip to content

Commit

Permalink
Mark TestStandardTaskRunner::test_read_task_utilization as db test
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis committed May 23, 2024
1 parent 3b1ecbc commit 110d0ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/task/task_runner/test_standard_task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,11 @@ def test_parsing_context(self):
"_AIRFLOW_PARSING_CONTEXT_TASK_ID=task1\n"
)

@pytest.mark.db_test
@mock.patch("airflow.task.task_runner.standard_task_runner.Stats.gauge")
@patch("airflow.utils.log.file_task_handler.FileTaskHandler._init_file")
def test_read_task_utilization(self, mock_init, mock_stats):
mock_init.return_value = "/tmp/any"
def test_read_task_utilization(self, mock_init, mock_stats, tmp_path):
mock_init.return_value = (tmp_path / "test_read_task_utilization.log").as_posix()
Job = mock.Mock()
Job.job_type = None
Job.task_instance = mock.MagicMock()
Expand Down

0 comments on commit 110d0ec

Please sign in to comment.