def configure_settings():
    logging.disable(logging.CRITICAL)
    if not settings.configured:
        # Determine the database settings depending on if a test_db var is set in CI mode or not
        test_db = os.environ.get('DB', None)
        if test_db is None:
            db_config = {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'NAME': 'ambition_dev',
                'USER': 'ambition_dev',
                'PASSWORD': 'ambition_dev',
                'HOST': 'localhost'
            }
        elif test_db == 'postgres':
            db_config = {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'USER': 'postgres',
                'NAME': 'entity_subscription',
            }
        elif test_db == 'sqlite':
            db_config = {
                'ENGINE': 'django.db.backends.sqlite3',
                'NAME': 'entity_subscription',
            }
        else:
            raise RuntimeError('Unsupported test DB {0}'.format(test_db))

        settings.configure(
            DATABASES={
                'default': db_config,
            },
            INSTALLED_APPS=(
                'django.contrib.auth',
                'django.contrib.contenttypes',
                'django.contrib.sessions',
                'django.contrib.admin',
                'entity',
                'south',
                'entity_subscription',
                'entity_subscription.tests',
            ),
            ROOT_URLCONF='entity_subscription.urls',
            DEBUG=False,
        )
Get API client with the provider and user token set.
dataset/ETHPy150Open ambitioninc/django-entity-subscription/settings.py/configure_settings--crossover with--dataset/ETHPy150Open mlavin/django-all-access/allaccess/tests/test_models.py/AccountAccessTestCase.test_fetch_api_client