def setUp(self): # Fill offering info # Create test directories offering_path1 = os.path.join(settings.BASEDIR, 'media/provider__test_offering1__1.0') offering_path2 = os.path.join(settings.BASEDIR, 'media/provider__test_offering2__1.0') offering_path3 = os.path.join(settings.BASEDIR, 'media/provider__test_offering3__1.0') os.makedirs(offering_path1) os.makedirs(offering_path2) os.makedirs(offering_path3) self._dirs_to_remove.append(offering_path1) self._dirs_to_remove.append(offering_path2) self._dirs_to_remove.append(offering_path3) test_icon_path = os.path.join( settings.BASEDIR, 'wstore/defaulttheme/static/assets/img/noimage.png') shutil.copy2(test_icon_path, os.path.join(offering_path1, 'image.png')) shutil.copy2(test_icon_path, os.path.join(offering_path2, 'image.png')) shutil.copy2(test_icon_path, os.path.join(offering_path3, 'image.png')) _set_offering_organization('21000aba8e05ac2115f022ff', 'provider') _set_offering_organization('31000aba8e05ac2115f022f0', 'provider') _set_offering_organization('aaaaaaaaaaaaac2115f022f0', 'admin') _fill_purchase_org('61006aba8e05ac21bbbbbbbb', 'provider') _fill_provider_role('provider') # Create indexes save_indexes() _create_indexes() # Create tag indexes save_tags() _create_tags() WStoreSeleniumTestCase.setUp(self)
def setUp(self): # Fill offering info # Create test directories offering_path1 = os.path.join(settings.BASEDIR, 'media/provider__test_offering1__1.0') offering_path2 = os.path.join(settings.BASEDIR, 'media/provider__test_offering2__1.0') offering_path3 = os.path.join(settings.BASEDIR, 'media/provider__test_offering3__1.0') os.makedirs(offering_path1) os.makedirs(offering_path2) os.makedirs(offering_path3) self._dirs_to_remove.append(offering_path1) self._dirs_to_remove.append(offering_path2) self._dirs_to_remove.append(offering_path3) test_icon_path = os.path.join(settings.BASEDIR, 'wstore/defaulttheme/static/assets/img/noimage.png') shutil.copy2(test_icon_path, os.path.join(offering_path1, 'image.png')) shutil.copy2(test_icon_path, os.path.join(offering_path2, 'image.png')) shutil.copy2(test_icon_path, os.path.join(offering_path3, 'image.png')) _set_offering_organization('21000aba8e05ac2115f022ff', 'provider') _set_offering_organization('31000aba8e05ac2115f022f0', 'provider') _set_offering_organization('aaaaaaaaaaaaac2115f022f0', 'admin') _fill_purchase_org('61006aba8e05ac21bbbbbbbb', 'provider') _fill_provider_role('provider') # Create indexes save_indexes() _create_indexes() # Create tag indexes save_tags() _create_tags() WStoreSeleniumTestCase.setUp(self)
def setUp(self): # Fill offering info # Create test directories offering_path1 = os.path.join(settings.BASEDIR, 'media/provider__test_offering1__1.0') offering_path2 = os.path.join(settings.BASEDIR, 'media/provider__test_offering2__1.0') offering_path3 = os.path.join(settings.BASEDIR, 'media/provider__test_offering3__1.0') os.makedirs(offering_path1) os.makedirs(offering_path2) os.makedirs(offering_path3) self._dirs_to_remove.append(offering_path1) self._dirs_to_remove.append(offering_path2) self._dirs_to_remove.append(offering_path3) test_icon_path = os.path.join(settings.BASEDIR, 'wstore/defaulttheme/static/assets/img/noimage.png') shutil.copy2(test_icon_path, os.path.join(offering_path1, 'image.png')) shutil.copy2(test_icon_path, os.path.join(offering_path2, 'image.png')) shutil.copy2(test_icon_path, os.path.join(offering_path3, 'image.png')) # Load USDL info offering1_info = { 'base_uri': 'http://localhost:8081', 'image_url': '/media/provider__test_offering1__1.0/image.png', 'name': 'test_offering1', 'description': 'test', 'pricing': { 'price_model': 'free' } } _fill_offering_description('21000aba8e05ac2115f022ff', offering1_info, 'provider') offering2_info = { 'base_uri': 'http://localhost:8081', 'image_url': '/media/provider__test_offering2__1.0/image.png', 'name': 'test_offering2', 'description': 'example', 'pricing': { 'price_model': 'free' } } _fill_offering_description('31000aba8e05ac2115f022f0', offering2_info, 'provider') offering3_info = { 'base_uri': 'http://localhost:8081', 'image_url': '/media/provider__test_offering3__1.0/image.png', 'name': 'test_offering3', 'description': 'example offering 3', 'pricing': { 'price_model': 'free' } } _fill_offering_description('aaaaaaaaaaaaac2115f022f0', offering3_info, 'admin') _fill_purchase_org('61006aba8e05ac21bbbbbbbb', 'provider') _fill_provider_role('provider') # Create indexes save_indexes() _create_indexes() # Create tag indexes save_tags() _create_tags() WStoreSeleniumTestCase.setUp(self)