File adjust-jsonschema-test-to-newer-versions.patch of Package salt

From b2abdf2f08047b7a6ef9ca7976cb19f4751b0ee7 Mon Sep 17 00:00:00 2001
From: Alexander Graul <agraul@suse.com>
Date: Tue, 22 Jul 2025 14:25:39 +0200
Subject: [PATCH] Adjust jsonschema test to newer versions

The exception message changed with jsonschema v4.21.0.
---
 tests/pytests/unit/config/schemas/test_ssh.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/pytests/unit/config/schemas/test_ssh.py b/tests/pytests/unit/config/schemas/test_ssh.py
index 93692edabd..e5c6c3eea1 100644
--- a/tests/pytests/unit/config/schemas/test_ssh.py
+++ b/tests/pytests/unit/config/schemas/test_ssh.py
@@ -210,7 +210,11 @@ def test_config_validate():
             ssh_schemas.RosterEntryConfig.serialize(),
             format_checker=jsonschema.FormatChecker(),
         )
-    assert "is too short" in excinfo.value.message
+    if JSONSCHEMA_VERSION >= Version("4.21.0"):
+        msg = "should be non-empty"
+    else:
+        msg = "is too short"
+    assert msg in excinfo.value.message
 
     with pytest.raises(jsonschema.exceptions.ValidationError) as excinfo:
         jsonschema.validate(
-- 
2.50.1

openSUSE Build Service is sponsored by