"""Features tests.""" from flask import g from owsfeatures import features from reporting import api from reporting.constants.features import POINT_OF_SALE_PRICE_COLUMNS from reporting.features import FEATURES_ATTRIBUTE def test_is_point_of_sale_price_columns_enabled_true(context): """Checking is_point_of_sale_price_columns_enabled is true. (When flag is enabled). """ with context, api.app.test_request_context(): setattr( g, FEATURES_ATTRIBUTE, {POINT_OF_SALE_PRICE_COLUMNS: 'enabled'} ) result = features.is_feature_enabled(POINT_OF_SALE_PRICE_COLUMNS) assert result is True