<s> from __future__ import absolute_import <EOL> from formencode import htmlfill <EOL> def test_defaults_legacy ( ) : <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , defaults = { "<STR_LIT:foo>" : "<STR_LIT>" } , <EOL> force_defaults = True ) <EOL> assert expected_html == rendered_html <EOL> def test_defaults_attr_ignore ( ) : <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , defaults = { "<STR_LIT:foo>" : "<STR_LIT>" } , <EOL> force_defaults = True , <EOL> data_formencode_ignore = True ) <EOL> assert expected_html == rendered_html <EOL> def test_defaults_attr_form ( ) : <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , defaults = { "<STR_LIT:foo>" : "<STR_LIT>" } , <EOL> force_defaults = True , <EOL> data_formencode_form = "<STR_LIT:b>" , ) <EOL> assert expected_html == rendered_html <EOL> def test_error_legacy ( ) : <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , errors = { "<STR_LIT:foo>" : "<STR_LIT>" } , <EOL> prefix_error = True ) <EOL> assert expected_html == rendered_html <EOL> def test_error_attr_ignore ( ) : <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , errors = { "<STR_LIT:foo>" : "<STR_LIT>" } , <EOL> force_defaults = True , <EOL> data_formencode_form = "<STR_LIT:b>" , ) <EOL> def test_error_attr_form ( ) : <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , errors = { "<STR_LIT:foo>" : "<STR_LIT>" } , <EOL> force_defaults = True , <EOL> data_formencode_form = "<STR_LIT:b>" , ) <EOL> assert expected_html == rendered_html <EOL> def test_error_attr_form_alt ( ) : <EOL> """<STR_LIT>""" <EOL> html = """<STR_LIT>""" <EOL> expected_html = """<STR_LIT>""" <EOL> rendered_html = htmlfill . render ( html , defaults = { "<STR_LIT:bar>" : "<STR_LIT>" } , <EOL> errors = { "<STR_LIT:foo>" : "<STR_LIT>" , "<STR_LIT>" : "<STR_LIT>" } , <EOL> force_defaults = True , <EOL> data_formencode_form = "<STR_LIT:c>" , <EOL> data_formencode_ignore = True , <EOL> ) <EOL> assert expected_html == rendered_html <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> test_defaults_legacy ( ) <EOL> test_defaults_attr_ignore ( ) <EOL> test_defaults_attr_form ( ) <EOL> test_error_legacy ( ) <EOL> test_error_attr_ignore ( ) <EOL> test_error_attr_form ( ) <EOL> test_error_attr_form_alt ( ) </s>
