def test_format_tag(tag: Tag, expected: dict):
    """Test that the tag dict is correct.

    Args:
        tag: The tag to test.
        expected: The expected tag dictionary.
    """
    tag_dict = dict(tag)
    assert tag_dict["name"] == expected["name"]
    assert tag_dict["contents"] == expected["contents"]
    for prop, prop_value in tag_dict["props"].items():
        assert prop_value.equals(LiteralVar.create(expected["props"][prop]))
Test that the tag dict is correct.

    Args:
        tag: The tag to test.
        expected: The expected tag dictionary.
    
tests/units/components/test_tag.py