From 9edc3d4320f423c221049afd026f4f1427545a5a Mon Sep 17 00:00:00 2001 From: Patrick Leary Date: Tue, 31 Dec 2024 14:54:25 -0500 Subject: [PATCH] fix specs --- tests/conftest.py | 1 + tests/test_vision_inferrer.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 7a5660a..f58935f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -36,4 +36,5 @@ def inatInferrer(request, mocker): os.path.realpath(os.path.dirname(__file__) + "/fixtures/synonyms.csv") } mocker.patch("tensorflow.keras.models.load_model", return_value=MagicMock()) + mocker.patch("tensorflow.keras.Model", return_value=MagicMock()) return InatInferrer(config) diff --git a/tests/test_vision_inferrer.py b/tests/test_vision_inferrer.py index 18830bf..ccf64f1 100644 --- a/tests/test_vision_inferrer.py +++ b/tests/test_vision_inferrer.py @@ -6,6 +6,7 @@ class TestVisionInferrer: def test_initialization(self, mocker): mocker.patch("tensorflow.keras.models.load_model", return_value=MagicMock()) + mocker.patch("tensorflow.keras.Model", return_value=MagicMock()) model_path = "model_path" inferrer = VisionInferrer(model_path) assert inferrer.model_path == model_path @@ -16,6 +17,7 @@ def test_initialization(self, mocker): def test_process_image(self, mocker): mocker.patch("tensorflow.keras.models.load_model", return_value=MagicMock()) + mocker.patch("tensorflow.keras.Model", return_value=MagicMock()) model_path = "model_path" inferrer = VisionInferrer(model_path) theimage = "theimage"