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.

22 lines
852 B

  1. # Copyright 2017 Tecnativa - Vicent Cubells
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo.tests import common
  4. class TestContractSignatureTracking(common.SavepointCase):
  5. @classmethod
  6. def setUpClass(cls):
  7. super(TestContractSignatureTracking, cls).setUpClass()
  8. # Simple 1x1 transparent base64 encoded GIF
  9. cls.image = 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
  10. def test_contract_signature_tracking(self):
  11. self.contract = self.env['account.analytic.account'].create({
  12. 'name': 'Test Contract',
  13. 'customer_signature': self.image,
  14. })
  15. message = self.env['mail.message'].search([
  16. ('res_id', '=', self.contract.id)
  17. ], order='id desc', limit=1)
  18. self.assertIn('Signature has been created.', message.body)