def test_html_to_xhtml_ampersands_should_be_replaced_in_attribute_values(): content = """<html><p id="&"></p></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><p id="&"></p></html>"""
def test_html_to_xhtml_quotes_should_be_replaced_in_attribute_values(): content = """<html><p id="""></p></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><p id="""></p></html>"""
def test_html_to_xhtml_ampersands_should_be_replaced_in_data(): content = """<html><p>&</p></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><p>&</p></html>"""
def test_html_to_xhtml_gts_should_be_replaced_in_data(): content = """<html><p>></p></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><p>></p></html>"""
def test_html_to_xhtml_self_closing_tags_should_not_have_closing_tags(): content = """<html><br/></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><br/></html>"""
def test_html_to_xhtml_attributes_should_have_values(): content = """<html><option checked></option></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><option checked=""></option></html>"""
def test_html_to_xhtml_comment_should_be_removed(): content = """<html><!-- comment --></html>""" normalized = html_to_xhtml(content) assert normalized == """<html></html>"""
def test_html_to_xhtml_doctype_should_be_removed(): content = """<!DOCTYPE html><html></html>""" normalized = html_to_xhtml(content) assert normalized == """<html></html>"""
def test_html_to_xhtml_well_formed_xml_should_succeed(): content = """<html></html>""" normalized = html_to_xhtml(content) assert normalized == """<html></html>"""
def test_html_to_xhtml_unicode_attribute_value_should_be_preserved(): content = """<html><p foo="ğış"></p></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><p foo="ğış"></p></html>"""
def test_html_to_xhtml_unicode_data_should_be_preserved(): content = """<html><p>ğış</p></html>""" normalized = html_to_xhtml(content) assert normalized == """<html><p>ğış</p></html>"""