You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
451 B

  1. -
  2. Set valid email
  3. -
  4. !record {model: res.partner, id: base.res_partner_12}:
  5. email: 'info@agilebg.com'
  6. -
  7. Try invalid email
  8. -
  9. !python {model: res.partner}: |
  10. try:
  11. self.write(cr, uid, [ref('base.res_partner_12')], {
  12. 'email': 'john',
  13. })
  14. assert False, "An exception should have been raised, 'john' is not a valid email!"
  15. except openerp.exceptions.Warning:
  16. # exception was raised as expected
  17. pass