def test_populate_product_cache_billing_defs(self): BILLING_PRODUCTS = "example_saas_project.core.billing" loading.product_cache = loading.populate_product_cache(products=BILLING_PRODUCTS) plans = [ billing_defs.SecretFreePlan, billing_defs.FreePlan, billing_defs.SecretPlan, billing_defs.BronzePlan, billing_defs.SilverPlan, billing_defs.GoldPlan, ] self.assertListEqual(plans, loading.get_products(hidden=True))
def test_populate_product_cache_billing_defs(self): BILLING_PRODUCTS = 'example_saas_project.core.billing' loading.product_cache = loading.populate_product_cache( products=BILLING_PRODUCTS, ) plans = [ billing_defs.SecretFreePlan, billing_defs.FreePlan, billing_defs.SecretPlan, billing_defs.BronzePlan, billing_defs.SilverPlan, billing_defs.GoldPlan, ] self.assertListEqual(plans, loading.get_products(hidden=True))
def test_populate_product_cache_module_list(self): BILLING_PRODUCTS = ( "example_saas_project.core.products", ["FreePlan", "BronzePlan", "SilverPlan", "GoldPlan", "CustomPlan", "SecretPlan", "EnterprisePlan"], ) BILLING_DEFINITIONS = () loading.product_cache = loading.populate_product_cache(products=BILLING_PRODUCTS) plans = [ billing_defs.FreePlan, billing_defs.BronzePlan, billing_defs.SilverPlan, billing_defs.GoldPlan, product_defs.CustomPlan, product_defs.SecretPlan, product_defs.EnterprisePlan, ] self.assertListEqual(plans, loading.get_products(hidden=True))
def test_populate_product_cache_module_list(self): BILLING_PRODUCTS = ('example_saas_project.core.products', [ 'FreePlan', 'BronzePlan', 'SilverPlan', 'GoldPlan', 'CustomPlan', 'SecretPlan', 'EnterprisePlan', ]) BILLING_DEFINITIONS = () loading.product_cache = loading.populate_product_cache( products=BILLING_PRODUCTS, ) plans = [ billing_defs.FreePlan, billing_defs.BronzePlan, billing_defs.SilverPlan, billing_defs.GoldPlan, product_defs.CustomPlan, product_defs.SecretPlan, product_defs.EnterprisePlan, ] self.assertListEqual(plans, loading.get_products(hidden=True))