From 5906b37f5ba4e4d2e34c86dc97b5ecee66b85b65 Mon Sep 17 00:00:00 2001 From: GSRN Date: Thu, 18 Sep 2025 13:43:15 +0200 Subject: [PATCH] test: Simplify mock responses in service health check tests ### Summary of Changes - Consolidated mock response definitions in the `test_get_services` method for improved readability. - Enhanced maintainability of the test suite by streamlining the structure of service status mock data. ### Expected Results - Improved clarity in test definitions, making it easier to understand the expected service responses. - Facilitated future updates to the test suite by reducing complexity in mock data setup. --- .../tests/test_general_routes.py | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/services/service-adapters/tests/test_general_routes.py b/services/service-adapters/tests/test_general_routes.py index e221470..0a74a8a 100644 --- a/services/service-adapters/tests/test_general_routes.py +++ b/services/service-adapters/tests/test_general_routes.py @@ -50,27 +50,9 @@ class TestGeneralRoutes: # Mock the health check results mock_check_services.return_value = { - "home_assistant": { - "status": "unknown", - "response_time": None, - "error": None, - "uptime": None, - "metadata": {} - }, - "frigate": { - "status": "unknown", - "response_time": None, - "error": None, - "uptime": None, - "metadata": {} - }, - "immich": { - "status": "disabled", - "response_time": None, - "error": None, - "uptime": None, - "metadata": {} - } + "home_assistant": {"status": "unknown", "response_time": None, "error": None, "uptime": None, "metadata": {}}, + "frigate": {"status": "unknown", "response_time": None, "error": None, "uptime": None, "metadata": {}}, + "immich": {"status": "disabled", "response_time": None, "error": None, "uptime": None, "metadata": {}}, } response = client.get("/services")