def test_init(self): obj = nonza.SMFailed( condition=(namespaces.stanzas, "item-not-found") ) self.assertEqual( (namespaces.stanzas, "item-not-found"), obj.condition )
def test_default_init(self): obj = nonza.SMFailed() self.assertEqual((namespaces.stanzas, "undefined-condition"), obj.condition)
def test_init(self): obj = nonza.SMFailed(condition=errors.ErrorCondition.ITEM_NOT_FOUND) self.assertEqual(errors.ErrorCondition.ITEM_NOT_FOUND, obj.condition.enum_member)
def test_default_init(self): obj = nonza.SMFailed() self.assertEqual(errors.ErrorCondition.UNDEFINED_CONDITION, obj.condition.enum_member)