We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7586f11 commit 57ca56bCopy full SHA for 57ca56b
tests/test_autocomponent.py
@@ -118,6 +118,11 @@ def test_cms_component_invalid_identifier(self):
118
cms_component(context, "valid_name")
119
self.assertEqual(len(context["_cms_components"]["cms_component"]), 1)
120
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
+
126
# Invalid identifiers should raise ValueError
127
with self.assertRaises(ValueError) as cm:
128
cms_component(context, "invalid-name")
0 commit comments