#NEWLINE# def test_getElementType( self ) : #NEWLINE# #INDENT# '\n        Test getting an element for a stanza error with a given type.\n        ' #NEWLINE# e = error . StanzaError ( 'feature-not-implemented' , 'auth' ) #NEWLINE# element = e . getElement ( ) #NEWLINE# self . assertEquals ( element . uri , None ) #NEWLINE# self . assertEquals ( self [ 'type' ] , 'auth' ) #NEWLINE# self . assertEquals ( element [ 'code' ] , '501' )