From fd398ff578c19f7959b023f26fd89d4b1612ccf7 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 1 Jul 2024 16:05:01 +0100 Subject: [PATCH] normal Mock --- tests/test_job.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_job.py b/tests/test_job.py index e616c4aab..59a771e7d 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -16,7 +16,7 @@ import time from threading import Thread, Event import pytest -from mock import Mock, MagicMock +from mock import Mock from spalloc_client import ( Job, JobState, JobDestroyedError, ProtocolTimeoutError) from spalloc_client._keepalive_process import keep_job_alive @@ -31,16 +31,16 @@ @pytest.fixture def client(monkeypatch): # Mock out the client. - client = MagicMock() + client = Mock() client.version.return_value = GOOD_VERSION client.create_job.return_value = 123 import spalloc_client.job monkeypatch.setattr(spalloc_client.job, "ProtocolClient", - MagicMock(return_value=client)) + Mock(return_value=client)) import spalloc_client._keepalive_process monkeypatch.setattr(spalloc_client._keepalive_process, "ProtocolClient", - MagicMock(return_value=client)) + Mock(return_value=client)) return client