Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC

This commit is contained in:
CI Publish Bot
2026-05-10 21:19:11 +00:00
commit cbf9e6e6d6
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from odoo.tests.common import TransactionCase
class TestHgIndexCode(TransactionCase):
def setUp(self):
super().setUp()
self.code = self.env['hg.index.code'].create({'name': 'Тестовый код'})
def test_create(self):
self.assertEqual(self.code.name, 'Тестовый код')
def test_index_ids_empty_on_create(self):
self.assertFalse(self.code.index_ids)
def test_index_linked_to_code(self):
index = self.env['hg.index'].create({
'name': 'Тестовый показатель',
'internal_code_id': self.code.id,
})
self.assertIn(index, self.code.index_ids)