import pytest from reflex.components.core.html import Html def test_html_no_children(): with pytest.raises(ValueError): _ = Html.create() def test_html_many_children(): with pytest.raises(ValueError): _ = Html.create("foo", "bar") def test_html_create(): html = Html.create("

Hello !

") assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "

Hello !

" })' # type: ignore assert ( str(html) == '
Hello !

" })}/>' )