API - update tests config

This commit is contained in:
Sam 2022-05-29 09:27:41 +02:00
parent 5fb5343a83
commit e4f4be9534
3 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,7 @@ bandit:
build-client: lint-client build-client: lint-client
cd fittrackee_client && $(NPM) build cd fittrackee_client && $(NPM) build
check-all: lint-all type-check test-all check-all: bandit lint-all type-check test-all
check-client: lint-client test-client check-client: lint-client test-client

View File

@ -65,7 +65,6 @@ class TestingConfig(BaseConfig):
TOKEN_EXPIRATION_DAYS = 0 TOKEN_EXPIRATION_DAYS = 0
TOKEN_EXPIRATION_SECONDS = 3 TOKEN_EXPIRATION_SECONDS = 3
PASSWORD_TOKEN_EXPIRATION_SECONDS = 3 PASSWORD_TOKEN_EXPIRATION_SECONDS = 3
UPLOAD_FOLDER = '/tmp/FitTrackee/uploads' # nosec
UI_URL = 'http://0.0.0.0:5000' UI_URL = 'http://0.0.0.0:5000'
SENDER_EMAIL = 'fittrackee@example.com' SENDER_EMAIL = 'fittrackee@example.com'

View File

@ -7,6 +7,9 @@ os.environ['FLASK_ENV'] = 'testing'
os.environ['APP_SETTINGS'] = 'fittrackee.config.TestingConfig' os.environ['APP_SETTINGS'] = 'fittrackee.config.TestingConfig'
# to avoid resetting dev database during tests # to avoid resetting dev database during tests
os.environ['DATABASE_URL'] = os.environ['DATABASE_TEST_URL'] os.environ['DATABASE_URL'] = os.environ['DATABASE_TEST_URL']
TEMP_FOLDER = '/tmp/FitTrackee'
os.environ['UPLOAD_FOLDER'] = TEMP_FOLDER
os.environ['APP_LOG'] = TEMP_FOLDER + '/fittrackee.log'
pytest_plugins = [ pytest_plugins = [
'fittrackee.tests.fixtures.fixtures_app', 'fittrackee.tests.fixtures.fixtures_app',