@@ -65,7 +65,6 @@ def test_add_props():
6565 {
6666 "name" : "" ,
6767 "children" : [],
68- "contents" : "" ,
6968 "props" : [],
7069 },
7170 ),
@@ -74,47 +73,20 @@ def test_add_props():
7473 {
7574 "name" : "br" ,
7675 "children" : [],
77- "contents" : "" ,
7876 "props" : [],
7977 },
8078 ),
8179 (
82- Tag (contents = "hello" ),
80+ tagless . Tagless (contents = "hello" ),
8381 {
84- "name" : "" ,
85- "children" : [],
8682 "contents" : "hello" ,
87- "props" : [],
88- },
89- ),
90- (
91- Tag (name = "h1" , contents = "hello" ),
92- {
93- "name" : "h1" ,
94- "children" : [],
95- "contents" : "hello" ,
96- "props" : [],
9783 },
9884 ),
9985 (
10086 Tag (name = "box" , props = {"color" : "red" , "textAlign" : "center" }),
10187 {
10288 "name" : "box" ,
10389 "children" : [],
104- "contents" : "" ,
105- "props" : ['color:"red"' , 'textAlign:"center"' ],
106- },
107- ),
108- (
109- Tag (
110- name = "box" ,
111- props = {"color" : "red" , "textAlign" : "center" },
112- contents = "text" ,
113- ),
114- {
115- "name" : "box" ,
116- "children" : [],
117- "contents" : "text" ,
11890 "props" : ['color:"red"' , 'textAlign:"center"' ],
11991 },
12092 ),
@@ -134,8 +106,8 @@ def test_format_tag(tag: Tag, expected: dict):
134106def test_format_cond_tag ():
135107 """Test that the cond tag dict is correct."""
136108 tag = CondTag (
137- true_value = dict (Tag ( name = "h1" , contents = "True content" )),
138- false_value = dict (Tag ( name = "h2" , contents = "False content" )),
109+ true_value = dict (tagless . Tagless ( contents = "True content" )),
110+ false_value = dict (tagless . Tagless ( contents = "False content" )),
139111 cond = Var ("logged_in" , _var_type = bool ),
140112 )
141113 tag_dict = dict (tag )
@@ -147,10 +119,8 @@ def test_format_cond_tag():
147119 assert cond ._js_expr == "logged_in"
148120 assert cond ._var_type is bool
149121
150- assert true_value ["name" ] == "h1"
151122 assert true_value ["contents" ] == "True content"
152123
153- assert false_value ["name" ] == "h2"
154124 assert false_value ["contents" ] == "False content"
155125
156126
0 commit comments