"""Integration test configuration.""" from os.path import dirname from os.path import join from os import getenv from dotenv import load_dotenv from tests.integration.api.utils.splitio_client import SplitIoClient from tests.integration.api.utils.ows_features_api_client import FeaturesAPIClient # Load environment variables from a .env file if present dotenv_path = join(dirname(__file__), '.env') load_dotenv(dotenv_path) def basic_headers(): """Return headers.""" return {'Content-Type': 'application/json'} def ows_features_api_client(headers): """Create ows-accounting APIClient object.""" return FeaturesAPIClient(getenv('QA_BASE_URL'), headers) def update_default_integration(body, name): """Update gross_accounting and vendor_gross_net flags for a test user.""" clt = SplitIoClient() clt.full_update_split(body, name)