File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def test_get_root_element_no_element():
5050 assert str (actual ) == expected
5151
5252
53- def test_get_root_element_direct_view ():
53+ def test_get_root_element_direct_view_unicorn ():
5454 # Annoyingly beautifulsoup adds a blank string on the attribute
5555 expected = '<div unicorn:view="">test</div>'
5656
@@ -63,6 +63,17 @@ def test_get_root_element_direct_view():
6363 assert str (actual ) == expected
6464
6565
66+ def test_get_root_element_direct_view_u ():
67+ # Annoyingly beautifulsoup adds a blank string on the attribute
68+ expected = '<div u:view="">test</div>'
69+
70+ component_html = "<html><head></head>≤body><div u:view>test</div></body></html>"
71+ soup = BeautifulSoup (component_html , features = "html.parser" )
72+ actual = get_root_element (soup )
73+
74+ assert str (actual ) == expected
75+
76+
6677def test_get_root_element_direct_view_no_view ():
6778 component_html = "<html><head></head>≤body><div>test</div></body></html>"
6879 soup = BeautifulSoup (component_html , features = "html.parser" )
You can’t perform that action at this time.
0 commit comments