I can display datagrid content

This commit is contained in:
2026-01-08 15:19:16 +01:00
parent 70abf21c14
commit 797883dac8
8 changed files with 665 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
import pytest
from myfasthtml.core.utils import flatten
from myfasthtml.core.utils import flatten, make_html_id
@pytest.mark.parametrize("input_args,expected,test_description", [
@@ -56,3 +56,11 @@ def test_i_can_flatten(input_args, expected, test_description):
"""Test that flatten correctly handles various nested structures and arguments."""
result = flatten(*input_args)
assert result == expected, f"Failed for test case: {test_description}"
@pytest.mark.parametrize("string, expected", [
("My Example String!", "My-Example-String_"),
("123 Bad ID", "id_123-Bad-ID"),
(None, None)
])
def test_i_can_have_valid_html_id(string, expected):
assert make_html_id(string) == expected