From 77af5a34eba889c53463a270258778716a0030be Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 8 Nov 2024 08:55:13 +1000
Subject: [PATCH] test/test_svg: don't fail if we don't have any classes on an
 element

Fixes "AttributeError: 'NoneType' object has no attribute 'split'"
---
 test/test_svg.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_svg.py b/test/test_svg.py
index e4b10e6b..dc7db77d 100644
--- a/test/test_svg.py
+++ b/test/test_svg.py
@@ -52,7 +52,7 @@ def has_item(self, id: str, classes: Optional[List[str]] = None):
         assert len(nodes) == 1, f"Expected one element with id {id}, have {len(nodes)}"
         node = nodes[0]
         for klass in classes or []:
-            assert klass in node.get("class").split(
+            assert klass in node.get("class", "").split(
                 " "
             ), f"Missing class '{klass}' for {id}. Have: {node.get('class')}"