I can display datagrid content
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user