'Test comparing ElementBase objects.'

def testComparisons(self):

    class TestStanza(ElementBase, ):
        name = 'foo'
        namespace = 'foo'
        interfaces = set(('bar', 'baz'))
    stanza1 = TestStanza()
    stanza1['bar'] = 'a'
    self.failUnless(stanza1, 'Stanza    object    does    not    evaluate    to    True')
    stanza2 = TestStanza()
    stanza2['baz'] = 'b'
    self.failUnless((stanza1 != stanza2), 'Different    stanza    objects    incorrectly    compared    equal.')
    stanza1['baz'] = 'b'
    stanza2['bar'] = 'a'
    self.failUnless((stanza1 == stanza2), 'Equal    stanzas    incorrectly    compared    inequal.')
