File tree Expand file tree Collapse file tree
storage_image_product/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88from 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 ()
You can’t perform that action at this time.
0 commit comments