#NEWLINE# def test_default_tagname( self ) : #NEWLINE# #INDENT# bluff_dict = { #NEWLINE# #INDENT# None : tree . bluff_class , #NEWLINE# 'maeh' : self . maeh_class , #NEWLINE# #UNINDENT# } #NEWLINE# ns = self . Namespace ( 'uri:nsDefClass' ) #NEWLINE# ns . update ( bluff_dict ) #NEWLINE# tree = self . parse ( _bytes ( '\n            <test xmlns="bla" xmlns:ns1="uri:nsDefClass" xmlns:ns2="uri:nsDefClass">\n              <ns2:el1/><ns1:el2/><ns1:maeh/><ns2:maeh/><maeh/>\n            </test>\n            ' ) ) #NEWLINE# el = tree . getroot ( ) #NEWLINE# self . assertFalse ( isinstance ( el , etree . ElementBase ) ) #NEWLINE# for child in el [ : ( - 1 ) ] : #NEWLINE# #INDENT# self . assertTrue ( isinstance ( child , etree . ElementBase ) , child . tag ) #NEWLINE# #UNINDENT# self . assertFalse ( isinstance ( el [ ( - 1 ) ] , etree . ElementBase ) ) #NEWLINE# self . assertTrue ( hasattr ( el [ 0 ] , 'bluff' ) ) #NEWLINE# self . assertTrue ( hasattr ( el [ 1 ] , 'bluff' ) ) #NEWLINE# self . assertTrue ( hasattr ( el [ 2 ] , 'maeh' ) ) #NEWLINE# self . assertTrue ( hasattr ( el [ 3 ] , 'maeh' ) ) #NEWLINE# self . assertFalse ( hasattr ( el [ 4 ] , 'maeh' ) ) #NEWLINE# del el #NEWLINE# ns . clear ( )