@@ -364,17 +364,17 @@ def test_create_document_root():
364364 assert isinstance (lang , LiteralStringVar )
365365 assert lang .equals (Var .create ("en" ))
366366 # No children in head.
367- assert len (root .children [0 ].children ) == 4
368- assert isinstance (root .children [0 ].children [0 ], utils .Meta )
369- char_set = root .children [0 ].children [0 ].char_set # pyright: ignore [reportAttributeAccessIssue]
367+ assert len (root .children [0 ].children ) == 5
368+ assert isinstance (root .children [0 ].children [1 ], utils .Meta )
369+ char_set = root .children [0 ].children [1 ].char_set # pyright: ignore [reportAttributeAccessIssue]
370370 assert isinstance (char_set , LiteralStringVar )
371371 assert char_set .equals (Var .create ("utf-8" ))
372- assert isinstance (root .children [0 ].children [1 ], utils .Meta )
373- name = root .children [0 ].children [1 ].name # pyright: ignore [reportAttributeAccessIssue]
372+ assert isinstance (root .children [0 ].children [2 ], utils .Meta )
373+ name = root .children [0 ].children [2 ].name # pyright: ignore [reportAttributeAccessIssue]
374374 assert isinstance (name , LiteralStringVar )
375375 assert name .equals (Var .create ("viewport" ))
376- assert isinstance (root .children [0 ].children [2 ], document .Meta )
377- assert isinstance (root .children [0 ].children [3 ], document .Links )
376+ assert isinstance (root .children [0 ].children [3 ], document .Meta )
377+ assert isinstance (root .children [0 ].children [4 ], document .Links )
378378
379379
380380def test_create_document_root_with_scripts ():
@@ -389,9 +389,9 @@ def test_create_document_root_with_scripts():
389389 html_custom_attrs = {"project" : "reflex" },
390390 )
391391 assert isinstance (root , utils .Html )
392- assert len (root .children [0 ].children ) == 6
392+ assert len (root .children [0 ].children ) == 7
393393 names = [c .tag for c in root .children [0 ].children ]
394- assert names == ["Scripts" , "Scripts" , "meta" , "meta" , "Meta" , "Links" ]
394+ assert names == ["script" , " Scripts" , "Scripts" , "meta" , "meta" , "Meta" , "Links" ]
395395 lang = root .lang # pyright: ignore [reportAttributeAccessIssue]
396396 assert isinstance (lang , LiteralStringVar )
397397 assert lang .equals (Var .create ("rx" ))
@@ -408,10 +408,10 @@ def test_create_document_root_with_meta_char_set():
408408 head_components = comps ,
409409 )
410410 assert isinstance (root , utils .Html )
411- assert len (root .children [0 ].children ) == 4
411+ assert len (root .children [0 ].children ) == 5
412412 names = [c .tag for c in root .children [0 ].children ]
413- assert names == ["meta" , "meta" , "Meta" , "Links" ]
414- assert str (root .children [0 ].children [0 ].char_set ) == '"cp1252"' # pyright: ignore [reportAttributeAccessIssue]
413+ assert names == ["script" , " meta" , "meta" , "Meta" , "Links" ]
414+ assert str (root .children [0 ].children [1 ].char_set ) == '"cp1252"' # pyright: ignore [reportAttributeAccessIssue]
415415
416416
417417def test_create_document_root_with_meta_viewport ():
@@ -424,10 +424,10 @@ def test_create_document_root_with_meta_viewport():
424424 head_components = comps ,
425425 )
426426 assert isinstance (root , utils .Html )
427- assert len (root .children [0 ].children ) == 5
427+ assert len (root .children [0 ].children ) == 6
428428 names = [c .tag for c in root .children [0 ].children ]
429- assert names == ["meta" , "meta" , "meta" , "Meta" , "Links" ]
430- assert str (root .children [0 ].children [0 ].http_equiv ) == '"refresh"' # pyright: ignore [reportAttributeAccessIssue]
431- assert str (root .children [0 ].children [1 ].name ) == '"viewport"' # pyright: ignore [reportAttributeAccessIssue]
432- assert str (root .children [0 ].children [1 ].content ) == '"foo"' # pyright: ignore [reportAttributeAccessIssue]
433- assert str (root .children [0 ].children [2 ].char_set ) == '"utf-8"' # pyright: ignore [reportAttributeAccessIssue]
429+ assert names == ["script" , " meta" , "meta" , "meta" , "Meta" , "Links" ]
430+ assert str (root .children [0 ].children [1 ].http_equiv ) == '"refresh"' # pyright: ignore [reportAttributeAccessIssue]
431+ assert str (root .children [0 ].children [2 ].name ) == '"viewport"' # pyright: ignore [reportAttributeAccessIssue]
432+ assert str (root .children [0 ].children [2 ].content ) == '"foo"' # pyright: ignore [reportAttributeAccessIssue]
433+ assert str (root .children [0 ].children [3 ].char_set ) == '"utf-8"' # pyright: ignore [reportAttributeAccessIssue]
0 commit comments