Community mailing list archives

Re: unit testing odoo constraint

Vauxoo S.A. de C.V., Moisés Augusto López Calderón
- 06/05/2015 06:39:37
If you use "assertRaisesRegexp" you can add a exactly message that you expected it.

2015-06-04 18:00 GMT+02:00 Jos De Graeve <>:

2015-06-04 16:27 GMT+02:00 Nicolas Schmitt <>:
The best way I have found to use the assertRaises is using it like this:

with self.assertRaises(ExceptionType):
    # code that should raise the error

Tell me how it goes.

Thanks,  that fixed it.

Jos De Graeve - Apertoso business ICT

Guido Gezellelaan 16 - B-9800 Deinze - Belgium
mail/im/skype: - apertoso

Post to:

Moisés López Calderón
Vauxoo - OpenERP's Gold Partner
Mobile: (+521) 477-752-22-30
Office: (+52) 477-773-33-46
twitter: @vauxoo