Odoo18-Base/odoo/addons/test_new_api/tests/test_attributes.py

13 lines
330 B
Python
Raw Permalink Normal View History

2025-01-06 10:57:38 +07:00
# -*- coding: utf-8 -*-
from odoo.tests import common
class TestAttributes(common.TransactionCase):
def test_we_cannot_add_attributes(self):
Model = self.env['test_new_api.category']
instance = Model.create({'name': 'Foo'})
with self.assertRaises(AttributeError):
instance.unknown = 42