sintonia/api/libretime_api/settings/testing.py
jo f7bb6e7592 feat: move storage path setting to configuration file
- change default storage path to /srv/libretime
- remove music dirs table
- use /tmp for testing storage
- storage dir should always have a trailing slash
2022-06-08 23:23:08 +02:00

40 lines
927 B
Python

import os
from .._fixtures import fixture_path
os.environ.setdefault("LIBRETIME_DEBUG", "true")
os.environ.setdefault("LIBRETIME_GENERAL_PUBLIC_URL", "http://localhost")
os.environ.setdefault("LIBRETIME_GENERAL_API_KEY", "testing")
os.environ.setdefault("LIBRETIME_STORAGE_PATH", str(fixture_path))
# pylint: disable=wrong-import-position,unused-import
from .prod import (
ALLOWED_HOSTS,
API_VERSION,
AUTH_PASSWORD_VALIDATORS,
AUTH_USER_MODEL,
CONFIG,
DATABASES,
DEBUG,
DEFAULT_AUTO_FIELD,
INSTALLED_APPS,
LANGUAGE_CODE,
LOGGING,
MIDDLEWARE,
REST_FRAMEWORK,
ROOT_URLCONF,
SECRET_KEY,
SPECTACULAR_SETTINGS,
STATIC_URL,
TEMPLATES,
TIME_ZONE,
USE_I18N,
USE_L10N,
USE_TZ,
WSGI_APPLICATION,
)
# Testing
# https://docs.djangoproject.com/en/3.2/ref/settings/#test-runner
TEST_RUNNER = "libretime_api.tests.runner.ManagedModelTestRunner"