mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[ADD] contract_digitized_signature (#102)
* [ADD] contract_digitized_signature * Correct README and add signature_name * Change to char field * Improve tests to acchieve full coverage
This commit is contained in:
23
contract_digitized_signature/tests/test_contract_tracking.py
Normal file
23
contract_digitized_signature/tests/test_contract_tracking.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Tecnativa - Vicent Cubells
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp.tests import common
|
||||
|
||||
|
||||
class TestContractSignatureTracking(common.SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestContractSignatureTracking, cls).setUpClass()
|
||||
# Simple 1x1 transparent base64 encoded GIF
|
||||
cls.image = 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
|
||||
|
||||
def test_contract_signature_tracking(self):
|
||||
self.contract = self.env['account.analytic.account'].create({
|
||||
'name': 'Test Contract',
|
||||
'customer_signature': self.image,
|
||||
})
|
||||
message = self.env['mail.message'].search([
|
||||
('res_id', '=', self.contract.id)
|
||||
], order='id desc', limit=1)
|
||||
self.assertIn('Signature has been created.', message.body)
|
||||
Reference in New Issue
Block a user