File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,14 @@ def test_leaf_tag_content_type_validation():
145145 MJMLTag ("mj-text" , content = ["invalid" , "list" ], _is_leaf = True )
146146
147147
148+ def test_leaf_tag_attributes_type_validation ():
149+ with pytest .raises (TypeError , match = "attributes must be a dict or TagAttrDict" ):
150+ MJMLTag ("mj-text" , "content" , attributes = "invalid" , _is_leaf = True )
151+
152+ def test_container_tag_attributes_type_validation ():
153+ with pytest .raises (TypeError , match = "attributes must be a dict or TagAttrDict.*use positional arguments for container tags" ):
154+ MJMLTag ("mj-section" , attributes = "invalid" )
155+
148156def test_children_sequence_flattening ():
149157 child1 = MJMLTag ("mj-text" , content = "Text 1" )
150158 child2 = MJMLTag ("mj-text" , content = "Text 2" )
You can’t perform that action at this time.
0 commit comments