API - update testing config

This commit is contained in:
Sam 2020-05-02 10:39:43 +02:00
parent ea13cd8946
commit 958c6711a3
2 changed files with 5 additions and 0 deletions

View File

@ -40,3 +40,4 @@ class TestingConfig(BaseConfig):
BCRYPT_LOG_ROUNDS = 4 BCRYPT_LOG_ROUNDS = 4
TOKEN_EXPIRATION_DAYS = 0 TOKEN_EXPIRATION_DAYS = 0
TOKEN_EXPIRATION_SECONDS = 3 TOKEN_EXPIRATION_SECONDS = 3
UPLOAD_FOLDER = '/tmp/fitTrackee/uploads'

View File

@ -10,6 +10,10 @@ from fittrackee_api.users.models import User
os.environ["FLASK_ENV"] = 'testing' os.environ["FLASK_ENV"] = 'testing'
os.environ["APP_SETTINGS"] = 'fittrackee_api.config.TestingConfig' os.environ["APP_SETTINGS"] = 'fittrackee_api.config.TestingConfig'
# to avoid resetting dev database during tests
os.environ[
"DATABASE_URL"
] = 'postgres://fittrackee:fittrackee@localhost:5432/fittrackee_test'
def get_app_config(with_config=False): def get_app_config(with_config=False):