def get_internal_product_id_label(request): app_config = AppSettings() return { "INTERNAL_PRODUCT_ID_LABEL": app_config.get_internal_product_id_label(), "STAT_AMOUNT_OF_PRODUCT_CHECKS": app_config.get_amount_of_product_checks(), "STAT_AMOUNT_OF_UNIQUE_PRODUCT_CHECK_ENTRIES": app_config.get_amount_of_unique_product_check_entries(), }
def get_internal_product_id_label(request): app_config = AppSettings() return { "INTERNAL_PRODUCT_ID_LABEL": app_config.get_internal_product_id_label(), "STAT_AMOUNT_OF_PRODUCT_CHECKS": app_config.get_amount_of_product_checks(), "STAT_AMOUNT_OF_UNIQUE_PRODUCT_CHECK_ENTRIES": app_config.get_amount_of_unique_product_check_entries() }
def test_statistics_counter(self): settings = AppSettings() # get value value = settings.get_amount_of_product_checks() assert type(value) is int assert value == 0 value = settings.get_amount_of_unique_product_check_entries() assert type(value) is int assert value == 0 # set values settings.set_amount_of_product_checks(40) settings.set_amount_of_unique_product_check_entries(40) # get value value = settings.get_amount_of_product_checks() assert type(value) is int assert value == 40 value = settings.get_amount_of_unique_product_check_entries() assert type(value) is int assert value == 40 # set values settings.set_amount_of_product_checks("40") settings.set_amount_of_unique_product_check_entries("40") # get value value = settings.get_amount_of_product_checks() assert type(value) is int assert value == 40 value = settings.get_amount_of_unique_product_check_entries() assert type(value) is int assert value == 40