From 533bb8047ec8372a191b6f27e23480eb65a33698 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 15:34:36 +0000 Subject: [PATCH] fix: correct patch paths and assertions in diagnostic tests Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- tests/test_diagnostic.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_diagnostic.py b/tests/test_diagnostic.py index 403f8c06..8300f064 100644 --- a/tests/test_diagnostic.py +++ b/tests/test_diagnostic.py @@ -68,9 +68,9 @@ class TestTestNotification: data = response.json() assert data["status"] == "warning" - assert "not configured" in data["message"].lower() + assert "notification" in data["message"].lower() and "configured" in data["message"].lower() - @patch("app.api.diagnostic.send_notification") + @patch("app.utils.notification.send_notification") @patch("app.api.diagnostic.settings") def test_test_notification_success(self, mock_settings, mock_send, client): """Test successful notification test.""" @@ -85,7 +85,7 @@ class TestTestNotification: assert "services_count" in data mock_send.assert_called_once() - @patch("app.api.diagnostic.send_notification") + @patch("app.utils.notification.send_notification") @patch("app.api.diagnostic.settings") def test_test_notification_failure(self, mock_settings, mock_send, client): """Test notification test when sending fails.""" @@ -99,7 +99,7 @@ class TestTestNotification: assert data["status"] == "error" assert "failed" in data["message"].lower() - @patch("app.api.diagnostic.send_notification") + @patch("app.utils.notification.send_notification") @patch("app.api.diagnostic.settings") def test_test_notification_exception(self, mock_settings, mock_send, client): """Test notification test with exception.""" @@ -126,7 +126,7 @@ class TestTestNotification: class TestDiagnosticHelpers: """Test helper functions in diagnostic module.""" - @patch("app.api.diagnostic.dump_all_settings") + @patch("app.utils.config_validator.dump_all_settings") @patch("app.api.diagnostic.settings") def test_dump_all_settings_called(self, mock_settings, mock_dump, client): """Test that dump_all_settings is called."""