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.

23 lines
879 B

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