#NEWLINE# def test_toElementDelayLegacy( self ) : #NEWLINE# #INDENT# '\n        If legacy delay is requested, the legacy format is rendered.\n        ' #NEWLINE# message = muc . GroupChat ( ) #NEWLINE# message . delay = delay . Delay ( stamp = datetime ( 2002 , 10 , 13 , 23 , 58 , 37 , tzinfo = tzutc ( ) ) ) #NEWLINE# element = message . toElement ( legacyDelay = True ) #NEWLINE# query = ( "/message/x[@xmlns='%s']" % ( delay . NS_JABBER_DELAY , ) ) #NEWLINE# nodes = xpath . queryForNodes ( query , query ) #NEWLINE# self . assertNotIdentical ( None , nodes , 'Missing legacy delay element' )