Esempio n. 1
0
def set_up_mock_data(cls, product_qty=5, product_item_qty=3):
    cls.catalog = CatalogMockData().create()
    cls.products = ProductMockData(cls.catalog, product_qty).create_list()
    cls.product_items = [
        ProductItemsMockData(cls.products[i], product_item_qty).create_list()
        for i in range(product_qty)
    ]
Esempio n. 2
0
 def setUpTestData(cls):
     cls.product_count = 42
     cls.catalog = CatalogMockData().create()
     cls.products = ProductMockData(cls.catalog,
                                    cls.product_count).create_list()
     cls.url = cls.catalog.get_absolute_url()
     cls.template_name = CatalogView.template_name
Esempio n. 3
0
 def setUp(self):
     super().setUp()
     catalog = CatalogMockData().create()
     self.product = ProductMockData(catalog).create()
Esempio n. 4
0
 def setUpTestData(cls):
     cls.catalog = CatalogMockData().create()
     cls.product = ProductMockData(cls.catalog).create()
Esempio n. 5
0
 def setUpTestData(cls):
     cls.catalog = CatalogMockData().create()
     cls.product = ProductMockData(cls.catalog).create()
     cls.url = cls.product.get_absolute_url()
     cls.template_name = ProductDetail.template_name