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')}"