From 662e95a8657fc5eaef1a098d8f47fe56c57f5c3f Mon Sep 17 00:00:00 2001 From: Andreas Eknes Lie Date: Thu, 21 Sep 2023 17:35:46 +0200 Subject: [PATCH] Update test_job_queue test --- tests/unit_tests/job_queue/test_job_queue.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/unit_tests/job_queue/test_job_queue.py b/tests/unit_tests/job_queue/test_job_queue.py index 98a5cd0015e..d59ff634d5e 100644 --- a/tests/unit_tests/job_queue/test_job_queue.py +++ b/tests/unit_tests/job_queue/test_job_queue.py @@ -5,7 +5,7 @@ from pathlib import Path from threading import BoundedSemaphore from typing import Any, Callable, Dict, Optional -from unittest.mock import MagicMock, patch +from unittest.mock import patch import ert.callbacks from ert.config import QueueSystem @@ -331,10 +331,9 @@ def test_stop_long_running(): job_list[i]._start_time = 0 job_list[i]._end_time = 5 - queue = JobQueue(MagicMock()) + driver = Driver(driver_type=QueueSystem.LOCAL) + queue = JobQueue(driver) - # We don't need the c layer call here, we only need it added to - # the queue's job_list. with patch("ert.job_queue.JobQueue._add_job") as _add_job: for idx, job in enumerate(job_list): _add_job.return_value = idx