#NEWLINE# def test_basic( self ) : #NEWLINE# #INDENT# "\n        Test basic operations of exceptionFromStreamError.\n\n        Given a realistic stream error, check if a sane exception is returned.\n\n        Using this error::\n\n          <stream:error xmlns:stream='http://etherx.jabber.org/streams'>\n            <xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>\n          </stream:error>\n        " #NEWLINE# e = domish . Element ( ( 'http://etherx.jabber.org/streams' , 'error' ) ) #NEWLINE# e . addElement ( ( NS_XMPP_STREAMS , 'xml-not-well-formed' ) ) #NEWLINE# result = error . exceptionFromStreamError ( e ) #NEWLINE# self . assert_ ( isinstance ( result , error . StreamError ) ) #NEWLINE# self . assertEquals ( 'xml-not-well-formed' , result . condition )