diff --git a/fittrackee_api/fittrackee_api/config.py b/fittrackee_api/fittrackee_api/config.py index 224678c3..8b4c8f25 100644 --- a/fittrackee_api/fittrackee_api/config.py +++ b/fittrackee_api/fittrackee_api/config.py @@ -40,3 +40,4 @@ class TestingConfig(BaseConfig): BCRYPT_LOG_ROUNDS = 4 TOKEN_EXPIRATION_DAYS = 0 TOKEN_EXPIRATION_SECONDS = 3 + UPLOAD_FOLDER = '/tmp/fitTrackee/uploads' diff --git a/fittrackee_api/fittrackee_api/tests/conftest.py b/fittrackee_api/fittrackee_api/tests/conftest.py index 6ced914d..0b2bb1a5 100644 --- a/fittrackee_api/fittrackee_api/tests/conftest.py +++ b/fittrackee_api/fittrackee_api/tests/conftest.py @@ -10,6 +10,10 @@ from fittrackee_api.users.models import User os.environ["FLASK_ENV"] = 'testing' 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):