<s> from . import TestController <EOL> from sword2 . error_document import Error_Document <EOL> from sword2 . utils import NS <EOL> ED = """<STR_LIT>""" <EOL> ED2 = """<STR_LIT>""" <EOL> class TestEntry ( TestController ) : <EOL> def test_00_blank_init ( self ) : <EOL> error_d = Error_Document ( code = <NUM_LIT> , resp = { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> assert error_d . code == <NUM_LIT> <EOL> assert error_d . response_headers [ '<STR_LIT>' ] == '<STR_LIT>' <EOL> def test_01_init_with_xml ( self ) : <EOL> error_d = Error_Document ( ED ) <EOL> assert error_d . error_href == "<STR_LIT>" <EOL> assert error_d . title == "<STR_LIT>" <EOL> assert error_d . summary == """<STR_LIT>""" <EOL> print error_d . metadata <EOL> assert error_d . verbose_description [ <NUM_LIT:0> ] . strip ( ) == """<STR_LIT>""" , error_d . verbose_description <EOL> def test_02_error_info ( self ) : <EOL> error_d = Error_Document ( ED ) <EOL> assert error_d . error_info [ '<STR_LIT>' ] == "<STR_LIT>" <EOL> assert error_d . error_info [ '<STR_LIT:name>' ] == "<STR_LIT>" <EOL> def test_03_init_with_known_error_iri ( self ) : <EOL> error_d = Error_Document ( ED2 ) <EOL> assert error_d . error_href == "<STR_LIT>" <EOL> assert error_d . error_info [ '<STR_LIT:name>' ] == "<STR_LIT>" <EOL> def test_04_validate_code_with_known_error_iri ( self ) : <EOL> error_d = Error_Document ( ED2 , code = <NUM_LIT> ) <EOL> assert error_d . error_href == "<STR_LIT>" <EOL> assert error_d . error_info [ '<STR_LIT:name>' ] == "<STR_LIT>" <EOL> assert error_d . error_info [ '<STR_LIT>' ] == [ <NUM_LIT> ] <EOL> def test_04_invalid_code_with_known_error_iri ( self ) : <EOL> error_d = Error_Document ( ED2 , code = <NUM_LIT> ) <EOL> assert error_d . error_href == "<STR_LIT>" <EOL> assert error_d . error_info [ '<STR_LIT:name>' ] == "<STR_LIT>" <EOL> assert error_d . error_info [ '<STR_LIT>' ] == [ <NUM_LIT> ] </s>
