'Test modifying the error condition.'

def testCondition(self):

    msg = self.Message()
    msg['error']['condition'] = 'item-not-found'
    self.check(msg, '\n                                        <message    type="error">\n                                                <error    type="cancel"    code="404">\n                                                        <item-not-found    xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"    />\n                                                </error>\n                                        </message>\n                                ')
    self.failUnless((msg['error']['condition'] == 'item-not-found'), "Error    condition    doesn't    match.")
    msg['error']['condition'] = 'resource-constraint'
    self.check(msg, '\n                                        <message    type="error">\n                                                <error    type="wait"    code="500">\n                                                        <resource-constraint    xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"    />\n                                                </error>\n                                        </message>\n                                    ')
