from odoo.tests.common import TransactionCase


class ConfigurationCreate(TransactionCase):

    def test_create(self):
        """Test configuration item does not make variations"""

        attr_test = self.env['product.attribute'].create({
            'name': 'Test',
            'value_ids': [
                (0, 0, {'name': '1'}),
                (0, 0, {'name': '2'}),
            ],
        })

        test_template = self.env['product.template'].create({
            'name': 'Test Configuration',
            'config_ok': True,
            'type': 'consu',
            'categ_id': self.env.ref('product.product_category_5').id,
            'attribute_line_ids': [(0, 0, {
                'attribute_id': attr_test.id,
                'value_ids': [
                    (6, 0, attr_test.value_ids.ids),
                ],
                'required': True,
            }),
            ]
        })

        self.assertEqual(test_template.product_variant_count, 0,
                         "Create should not have any variants")

@@ -99,16 +99,19 @@
 ef test_
+01_
 create(s
@@ -1032,8 +1032,146 @@
 iants%22)%0A
+%0A    def test_02_product_configuration_restriction(self):%0A        %22%22%22Values on future steps breaking current wizard view %22%22%22%0A        pass%0A

add test