Skip to content

Commit 4f5659e

Browse files
committed
Merge PR #581 into 18.0
Signed-off-by simahawk
2 parents 89130b7 + d8f0cdf commit 4f5659e

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

storage_image_product/tests/common.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from odoo.addons.component.tests.common import TransactionComponentCase
99

1010

11-
class ProductImageCommonCase(TransactionComponentCase):
11+
class ProductImageCaseMixin:
1212
@staticmethod
1313
def _get_file_content(name, base_path=None, as_binary=False):
1414
path = base_path or os.path.dirname(os.path.abspath(__file__))
@@ -25,12 +25,18 @@ def _create_storage_image(cls, name):
2525
)
2626

2727
@classmethod
28-
def setUpClass(cls):
29-
super().setUpClass()
28+
def _setup_base_image_data(cls):
3029
cls.template = cls.env.ref("product.product_product_4_product_template")
3130
cls.product_a = cls.env.ref("product.product_product_4")
3231
cls.product_b = cls.env.ref("product.product_product_4b")
3332
cls.product_c = cls.env.ref("product.product_product_4c")
3433
cls.logo_image = cls._create_storage_image("logo-image.jpg")
3534
cls.white_image = cls._create_storage_image("white-image.jpg")
3635
cls.black_image = cls._create_storage_image("black-image.jpg")
36+
37+
38+
class ProductImageCommonCase(TransactionComponentCase, ProductImageCaseMixin):
39+
@classmethod
40+
def setUpClass(cls):
41+
super().setUpClass()
42+
cls._setup_base_image_data()

0 commit comments

Comments
 (0)