def test_add_style_create(component1, component2):
    """Test that adding style works with the create method.

    Args:
        component1: A test component.
        component2: A test component.
    """
    style = {
        component1.create: Style({"color": "white"}),
        component2.create: Style({"color": "black"}),
    }
    c1 = component1.create()._add_style_recursive(style)
    c2 = component2.create()._add_style_recursive(style)
    assert str(c1.style["color"]) == '"white"'
    assert str(c2.style["color"]) == '"black"'
Test that adding style works with the create method.

    Args:
        component1: A test component.
        component2: A test component.
    
tests/units/components/test_component.py