|
@ -5,6 +5,7 @@ |
|
|
from psycopg2 import IntegrityError |
|
|
from psycopg2 import IntegrityError |
|
|
from odoo.exceptions import AccessError, ValidationError |
|
|
from odoo.exceptions import AccessError, ValidationError |
|
|
from odoo.tests.common import TransactionCase |
|
|
from odoo.tests.common import TransactionCase |
|
|
|
|
|
from odoo.tools import mute_logger |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PartnerCase(TransactionCase): |
|
|
class PartnerCase(TransactionCase): |
|
@ -82,6 +83,7 @@ class PartnerCase(TransactionCase): |
|
|
self.tpl.model = "res.users" |
|
|
self.tpl.model = "res.users" |
|
|
self.assertEqual(self.tpl.model, self.tpl.model_id.model) |
|
|
self.assertEqual(self.tpl.model, self.tpl.model_id.model) |
|
|
|
|
|
|
|
|
|
|
|
@mute_logger('odoo.sql_db') |
|
|
def test_template_model_must_exist(self): |
|
|
def test_template_model_must_exist(self): |
|
|
"""Cannot create templates for unexisting models.""" |
|
|
"""Cannot create templates for unexisting models.""" |
|
|
with self.assertRaises(IntegrityError): |
|
|
with self.assertRaises(IntegrityError): |
|
|