Skip to content

Commit 57ca56b

Browse files
committed
add another test
1 parent 7586f11 commit 57ca56b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_autocomponent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ def test_cms_component_invalid_identifier(self):
118118
cms_component(context, "valid_name")
119119
self.assertEqual(len(context["_cms_components"]["cms_component"]), 1)
120120

121+
# Non-string identifiers should raise ValueError
122+
with self.assertRaises(ValueError) as cm:
123+
cms_component(context, 123)
124+
self.assertIn("component name must be a string.", str(cm.exception))
125+
121126
# Invalid identifiers should raise ValueError
122127
with self.assertRaises(ValueError) as cm:
123128
cms_component(context, "invalid-name")

0 commit comments

Comments
 (0)