Community mailing list archives

community@mail.odoo.com

unit testing odoo constraint

by
Apertoso, Jos De Graeve
- 06/04/2015 04:13:10
Hi,

I want to write a test to validate an odoo orm constraint


The constraint throws an openerp.exceptions.ValidationError when some condition is not met.

I my test i set the condition for the exception to be raised and check with assertRaises to verify it.


But when i run my test, the test fails with my validationError:


Some way or another, i'm doing something wrong with assertRaises but i can't see why.

Any tips ?

Jos De Graeve - Apertoso business ICT


Guido Gezellelaan 16 - B-9800 Deinze - Belgium
 
Direct: +32 9 381 64 51
General:+32 9 381 64 50
Mobile: +32 475 54 68 80
mail/im/skype: Jos.DeGraeve@apertoso.be - apertoso