AlluraTest/alluratest/validation.py
def validate_html5_chunk(html):
    """ When you don't have a html & body tags - this adds it"""
    # WebTest doesn't like HTML fragments without doctype,
    # so we output them sometimes for fragments, which is hack.
    # Unhack it here.
    doctype = '<!DOCTYPE html>'
    if html.startswith(doctype):
        html = html[len(doctype):]

    html = '''<!DOCTYPE html>
    <html>
    <head><title>Not empty</title></head>
    <body>
    %s
    </body></html>''' % html
    return validate_html5(html)
 When you don't have a html & body tags - this adds it
When you don't have a html & body tags - this adds it
When you don ' t have a html & body tags - this adds it
def validate_html5_chunk(html):
    doctype = '<!DOCTYPE html>'
    if html.startswith(doctype):
        html = html[len(doctype):]
    html = '''<!DOCTYPE html>
    <html>
    <head><title>Not empty</title></head>
    <body>
    %s
    </body></html>''' % html
    return validate_html5(html)
def validate_html5_chunk ( html ) : doctype = '<!DOCTYPE html>' if html . startswith ( doctype ) : html = html [ len ( doctype ) : ] html = '''<!DOCTYPE html>
    <html>
    <head><title>Not empty</title></head>
    <body>
    %s
    </body></html>''' % html return validate_html5 ( html )
When you don't have a html & body tags - this adds it
When you don ' t have a html & body tags - this adds it
""" When you don't have a html & body tags - this adds it""" # WebTest doesn't like HTML fragments without doctype, # so we output them sometimes for fragments, which is hack. # Unhack it here.
html