'Test clearing a stanza.'

def testClear(self):

    stanza = StanzaBase()
    stanza['to'] = 'user@example.com'
    stanza['payload'] = ET.Element('{foo}foo')
    stanza.clear()
    self.failUnless((stanza['payload'] == []), 'Stanza    payload    was    not    cleared    after    calling    .clear()')
    self.failUnless((str(stanza['to']) == 'user@example.com'), 'Stanza    attributes    were    not    preserved    after    calling    .clear()')
